Post by Dutch Pride Code » Tue Jul 27, 2021 8:38 pm

I'm not sure whether this also goes for other versions than OC 3.0.3.7 (which I'm using).
Maybe this is not a bug but at least new people should know this:

When installing a language pack (either by uploading or OCMOD), everything will work as expected. You will activate the language under system/localisation/languages and use this newly installed language as default for your admin panel. The trouble starts when you no longer need the language or found a better alternative. When you remove the language file without changing the stores default language back to English, a lot of translations will be missing. A couple of buttons and tab titles will no longer have text in them.

I assume most people know they should change the default language first, but for a few new people here it may come as a surprise. I think this could be solved so that if a language gets uninstalled or goes missing, OpenCart will automatically change the language to the first available and set this as default.

User avatar
Active Member

Posts

Joined
Sun Jan 26, 2020 9:46 pm

Post by straightlight » Tue Jul 27, 2021 9:00 pm

In order to know that, we'd need to have the language ID in the extension whereas an extension may also not involve any language IDs other than the default value in it. Which means, all extensions that are not relative to language IDs in people's projects would still need to be defined as default. In the end, the results will become the same with OCMod as per admin/controller/localisation/language/validateDelete method.

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 Dutch Pride Code » Wed Jul 28, 2021 1:14 am

Doesn't the database auto-increment an ID everytime a language file is added?
Or does this only happen after selecting it as a default language?

User avatar
Active Member

Posts

Joined
Sun Jan 26, 2020 9:46 pm

Post by straightlight » Wed Jul 28, 2021 1:16 am

EMGX wrote:
Wed Jul 28, 2021 1:14 am
Doesn't the database auto-increment an ID everytime a language file is added?
Or does this only happen after selecting it as a default language?
The extension installer does not use a language ID for each installed extensions. Languages from extensions are strictly based on the developers.

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
Who is online

Users browsing this forum: No registered users and 31 guests