Post by anatho » Thu Dec 08, 2011 9:35 am

I only need 2 languages in the shop, English and German. Also these are the only 2 languages that are active.
However, now if I want to add a category in admin section, it asks me to input my category name in EACH language, like French, Russian etc.
How can I overcome this? The languages are all deactivated! Do I have to delete them????
Last edited by i2Paq on Fri Dec 09, 2011 10:02 pm, edited 1 time in total.
Reason: Renamed and moved

Newbie

Posts

Joined
Wed Dec 07, 2011 6:55 am

Post by straightlight » Thu Dec 08, 2011 10:11 am

The 'each' language is not mandatory for all of them, I believe. Only one of the language or the default one for the store may be mandatory but I'm not quite sure on this one. Since you claimed to have deactivated the languages (except one obviously), what if you only enter the details for the language you want ? ;)

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by anatho » Thu Dec 08, 2011 10:20 am

This does not work.

Only 2 languages are activated, also in store front only 2 languages are shown.
However, if I want to add a new category or new product in admin section, ALL the languages are shown and I have to input titles in ALL languages. If I only input German and English, I cannot save the product, it gives me an error that not all the necessary data has been input.

Newbie

Posts

Joined
Wed Dec 07, 2011 6:55 am

Post by anatho » Fri Dec 09, 2011 8:06 am

nobody knows how to do that???

Who is using 1.5.1.3 Europa version? I think most of you (if not all) do not need many languages, maybe 2-4. How did you deactivate them in category/products menu? Deactivating in system-local settings only makes that they are not shown in the store front (flags).

Newbie

Posts

Joined
Wed Dec 07, 2011 6:55 am

Post by fido-x » Fri Dec 09, 2011 3:31 pm

There are 2 ways you can do this.

1. Don't just "disable" the language -- delete it!

2. Edit the model (admin/model/localisation/language.php) by changing line 239 from:

Code: Select all

$sql = "SELECT * FROM " . DB_PREFIX . "language"; 
to:

Code: Select all

$sql = "SELECT * FROM " . DB_PREFIX . "language" WHERE status = '1'; 
And at line 280, change:

Code: Select all

$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "language ORDER BY sort_order, name"); 
to:

Code: Select all

$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "language WHERE status = '1' ORDER BY sort_order, name"); 

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by i2Paq » Fri Dec 09, 2011 7:49 pm

fido-x wrote:There are 2 ways you can do this.
So you say that adding option 2 will disable the language fields in OC necessary for that language if that language is disabled?

So when adding a product it will not show these fields?

This should be in the core then!!

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by fido-x » Fri Dec 09, 2011 8:47 pm

i2Paq wrote:So you say that adding option 2 will disable the language fields in OC necessary for that language if that language is disabled?

So when adding a product it will not show these fields?
Yes, that's what I'm saying. When you disable a language, it is only disabled on the front-end, not in the back-end. In the back-end, all languages are loaded, regardless of status.
This should be in the core then!!
Probably should be reported as a bug!

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by i2Paq » Fri Dec 09, 2011 10:00 pm

fido-x wrote:Probably should be reported as a bug!
Your wish ;D

Issue 679: Language disabled only disables in storefront

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by k2tec » Fri Mar 16, 2012 3:28 am

Code: Select all

$sql = "SELECT * FROM " . DB_PREFIX . "language" WHERE status = '1';
should this not be

Code: Select all

$sql = "SELECT * FROM " . DB_PREFIX . "language  WHERE status = '1'";

User avatar
Active Member

Posts

Joined
Mon Apr 12, 2010 8:06 pm

Post by Qphoria » Fri Mar 16, 2012 4:01 am

This was something I added and removed from 1.4.9.x

By disabling the language in the admin, you cause many errors for yourself which is why I added it back in. Best plan is to instead use php to copy the english to the german version if the german textarea is left empty. This way it still lets you only enter it once but doesn't break other things downstream.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by deeve » Tue May 13, 2014 6:14 pm

Just tried the suggestions above in 1.5.2.1 & don't see any change. I still have French & German in Admin & only need English as am not offering alternative languages in front end.

Any other suggestions?
Is there such a VqMod Q was suggesting that can auto-fill the other languages?

Active Member

Posts

Joined
Tue Oct 20, 2009 4:31 pm

Post by christeibel » Sun Jan 24, 2016 12:02 am

SYSTEM>>LOCALISATION>>LANGUAGES>>"DELETE UNWANTED LANGUAGE"

Newbie

Posts

Joined
Wed Jan 20, 2016 11:09 pm

Post by opentoshopping » Sun Mar 11, 2018 8:46 pm

Up! This should be in the core!!!

New member

Posts

Joined
Sun Mar 11, 2018 8:45 pm
Who is online

Users browsing this forum: Amazon [Bot] and 34 guests