If this is your first visit, check our documentation. To post, register or login.
Forums / All Other Contributions/Addons / Language Manager [Support Thread]

Language Manager [Support Thread]

Started by balihr on 26 Dec 2025, 8:47 PM · Views: 3,895

Results 1 to 20 of 34
26 Dec 2025, 8:47 PM
#1
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,817
Plugin Contributions:
24

Language Manager [Support Thread]

A plugin that allows you to modify language files directly from the admin or even create your own language pack - no need to use FTP or understand advanced code.

Built as an Encapsulated Plugin for Zen Cart 2.1.0+ (no idea if it works on older versions, although it should work back to 1.5.8).

Any suggestions are more than welcome!

GitHub: https://github.com/zenexpert/Zen_Cart-Language-Manager

My site - Pro ZC Help
My portfolio | My plugins

30 Dec 2025, 4:46 PM
#2
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,817
Plugin Contributions:
24

Re: Language Manager [Support Thread]

Just updated.

  • fix for double sanitization in Advanced mode
  • basic mode allows clearing a string
  • basic mode supports reverting to original

My site - Pro ZC Help
My portfolio | My plugins

2 Jan 2026, 6:39 PM
#4
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
416
Plugin Contributions:
6

Re: Language Manager [Support Thread]

Did you test it with another language than English?
I tried with French and as soon as I clicked on save button, language is set back to English and the edit is actually saved in the English file, not the French one.
Trying to edit the French main language file gives an error message 'Invalid filename. Directory traversal detected.' on top of ZC window but no error log and no edit is saved.

ZC v2.2.2 PHP 8.4+ MySQL 8.4+

2 Jan 2026, 7:03 PM
#5
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,817
Plugin Contributions:
24

Re: Language Manager [Support Thread]

Ugh... Yes, I did test other languages, just not the MAIN language file... This should fix it.

Thanks for the feedback - every comment is most welcome!

My site - Pro ZC Help
My portfolio | My plugins

3 Jan 2026, 9:26 AM
#6
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
416
Plugin Contributions:
6

Re: Language Manager [Support Thread]

balihr:

Ugh... Yes, I did test other languages, just not the MAIN language file... This should fix it.

Thanks for the feedback - every comment is most welcome!

Good! The language setting is retained now and files edits are saved in their actual language.
For the main language file, there is some problem if you use modsecurity on Apache server, but I need to do more tests with this.

There is still another related problem : If, after editing a file, you changed language without selecting a new file, actually displayed file is still the precedent language one and doing any edit will gives an error from ZC.

ZC v2.2.2 PHP 8.4+ MySQL 8.4+

3 Jan 2026, 10:46 AM
#7
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,817
Plugin Contributions:
24

Re: Language Manager [Support Thread]

pilou2:

There is still another related problem : If, after editing a file, you changed language without selecting a new file, actually displayed file is still the precedent language one and doing any edit will gives an error from ZC.

I can't seem to reproduce this.
To make sure I understand it right: I'm in English language and select lang.account.php, make some edits and save it. I simply change language to Spanish, the same file is still selected and loads spanish definitions. I edit the file and save it, and it saves to the correct location (Successfully saved 1 overrides to includes/languages/spanish/responsive_classic/lang.account.php)

But yes, there might be issues with languages other than english because the plugin was originally built for a client who only wanted one language to edit, the rest was done just to try and accommodate it for the whole community... Please bear with me and help me iron it all out. :smile:

My site - Pro ZC Help
My portfolio | My plugins

3 Jan 2026, 3:00 PM
#8
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
416
Plugin Contributions:
6

Re: Language Manager [Support Thread]

balihr:

I can't seem to reproduce this.
To make sure I understand it right: I'm in English language and select lang.account.php, make some edits and save it. I simply change language to Spanish, the same file is still selected and loads spanish definitions. I edit the file and save it, and it saves to the correct location (Successfully saved 1 overrides to includes/languages/spanish/responsive_classic/lang.account.php)

But yes, there might be issues with languages other than english because the plugin was originally built for a client who only wanted one language to edit, the rest was done just to try and accommodate it for the whole community... Please bear with me and help me iron it all out. :smile:

Sorry, I was not clear enough, the last proble you described well only happens with main language file, For exemple, if you are editing lang.english.php and change language to French, the English version of the file is still displayed.

After ironing it a little bit more, this should be a great tool! I am not sure how far you want to go, because on the admin side, there is a lot that can be added, but not everything can be overriden.

ZC v2.2.2 PHP 8.4+ MySQL 8.4+

3 Jan 2026, 4:02 PM
#9
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,817
Plugin Contributions:
24

Re: Language Manager [Support Thread]

pilou2:

Sorry, I was not clear enough, the last proble you described well only happens with main language file, For exemple, if you are editing lang.english.php and change language to French, the English version of the file is still displayed.
Of course I didn't test THAT! :lamo:
Please try this.

After ironing it a little bit more, this should be a great tool!
I hope so! My main goal is to move Zen Cart away from being a developer-focused platform and bring it closer to the end user who doesn't want to deal with FTP and code editors. Anything that CAN be done without code editing, it's a step forward for the end user.

I am not sure how far you want to go
BRING IT ON!!!
Just kidding, not sure what time allows me to do... Ideas are most welcome, but can't promise I'll have time to implement any of it.

because on the admin side, there is a lot that can be added, but not everything can be overriden.
I have no plans on making this available for the admin language files if that's what you meant.

Thank you very much for the efforts, love the colab!

My site - Pro ZC Help
My portfolio | My plugins

5 Jan 2026, 5:54 AM
#10
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
416
Plugin Contributions:
6

Re: Language Manager [Support Thread]

balihr:

Of course I didn't test THAT! :lamo:
Please try this.
It is working !

balihr:

I hope so! My main goal is to move Zen Cart away from being a developer-focused platform and bring it closer to the end user who doesn't want to deal with FTP and code editors. Anything that CAN be done without code editing, it's a step forward for the end user.
Yes, especially when it comes to language and translation, there are not so many people who have skills in language and coding.

balihr:

BRING IT ON!!!
Just kidding, not sure what time allows me to do... Ideas are most welcome, but can't promise I'll have time to implement any of it.
I added some PRs on GitHub. One is just the translation of this plugin in case you want to add them... or not, do as you want with it. The other two should improve the code a little bit.

balihr:

I have no plans on making this available for the admin language files if that's what you meant.

Thank you very much for the efforts, love the colab!
Yes, this is what I meant, but partially. There are some language strings in admin that are visible to customers and one might want to change them. But this might complicate things a lot for only few strings. It is probably better to let this aside.

ZC v2.2.2 PHP 8.4+ MySQL 8.4+

5 Jan 2026, 6:12 AM
#11
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
416
Plugin Contributions:
6

Re: Language Manager [Support Thread]

I have identified a possible problem when using modsecurity module on Apache server. When there are more than 1000 parameters transmitted in a form, it considers it as an attack to overwhelm the server.
In ZC, the main language file has more than 500 constants and there is a checkbox in the form for each of them which double the number of parameters transmitted. The edit of this file get blocked by Modsecurity. This limit can be changed in Modsecrity settings but most servers that use it are probably set with the default limit of 1000.

ZC v2.2.2 PHP 8.4+ MySQL 8.4+

5 Jan 2026, 10:45 AM
#12
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,817
Plugin Contributions:
24

Re: Language Manager [Support Thread]

pilou2:

I added some PRs on GitHub. One is just the translation of this plugin in case you want to add them... or not, do as you want with it. The other two should improve the code a little bit.
Many thanks, all merged!

I wasn't really thinking in that direction and the plugin would only work in English admin. Probably should be mentioned in docs...

Yes, this is what I meant, but partially. There are some language strings in admin that are visible to customers and one might want to change them. But this might complicate things a lot for only few strings. It is probably better to let this aside.
Agreed, it probably would. Until admin is array-based ONLY and does not accept legacy style language files, I don't want to go into it. Perhaps some day...

My site - Pro ZC Help
My portfolio | My plugins

5 Jan 2026, 10:49 AM
#13
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,817
Plugin Contributions:
24

Re: Language Manager [Support Thread]

pilou2:

I have identified a possible problem when using modsecurity module on Apache server. When there are more than 1000 parameters transmitted in a form, it considers it as an attack to overwhelm the server.
In ZC, the main language file has more than 500 constants and there is a checkbox in the form for each of them which double the number of parameters transmitted. The edit of this file get blocked by Modsecurity. This limit can be changed in Modsecrity settings but most servers that use it are probably set with the default limit of 1000.

I have noticed this yesterday. Will try to find a solution.

My site - Pro ZC Help
My portfolio | My plugins

5 Jan 2026, 1:31 PM
#14
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,817
Plugin Contributions:
24

Re: Language Manager [Support Thread]

pilou2:

I have identified a possible problem when using modsecurity module on Apache server. When there are more than 1000 parameters transmitted in a form, it considers it as an attack to overwhelm the server.
In ZC, the main language file has more than 500 constants and there is a checkbox in the form for each of them which double the number of parameters transmitted. The edit of this file get blocked by Modsecurity. This limit can be changed in Modsecrity settings but most servers that use it are probably set with the default limit of 1000.

This should do the trick.
Looking forward to your comments! :smile:

My site - Pro ZC Help
My portfolio | My plugins

5 Jan 2026, 2:01 PM
#15
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
416
Plugin Contributions:
6

Re: Language Manager [Support Thread]

Yes, it does! You are quick! Modsecurity is no longer blocking anything.
No more problem left it seems, congratulation! I will continue playing with it in case of...

ZC v2.2.2 PHP 8.4+ MySQL 8.4+

5 Jan 2026, 2:03 PM
#16
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,817
Plugin Contributions:
24

Re: Language Manager [Support Thread]

pilou2:

You are quick!

My wife says the same... :P

My site - Pro ZC Help
My portfolio | My plugins

5 Jan 2026, 5:44 PM
#17
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
416
Plugin Contributions:
6

Re: Language Manager [Support Thread]

I just added a PR on GitHub for templates that are associated with a language. This is a feature of ZC that is probably unknown from most users, but you can actually use different templates depending on the language selected!
I modified the SQL query that sets the active template to look fo these associations. The query is more complicated but it works well with main language files, standard files and modules files too.

ZC v2.2.2 PHP 8.4+ MySQL 8.4+

5 Jan 2026, 5:57 PM
#18
pilou2 avatar

pilou2

Zen Follower

Join Date:
Jun 2008
Location:
Japan
Posts:
416
Plugin Contributions:
6

Re: Language Manager [Support Thread]

There are still a few things I would like to improve on the 'Create New Language Pack' functionality:

  • It would be nice to be able to clone languages files from another language than English.
  • If language files from encapsulated plugins could be cloned too, it would make a perfect base for translators to actually create a complete new language pack.
    I am interested in what you think of that?

ZC v2.2.2 PHP 8.4+ MySQL 8.4+

5 Jan 2026, 9:01 PM
#19
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,817
Plugin Contributions:
24

Re: Language Manager [Support Thread]

pilou2:

I just added a PR on GitHub for templates that are associated with a language. This is a feature of ZC that is probably unknown from most users, but you can actually use different templates depending on the language selected!
:shocking:
OK, I'm one of the people who didn't know about it... wow...

Would it be a better feature if we just had a template selection option? So, instead of switching to a template-related language, simply have an option to select which template you want to edit?

I modified the SQL query that sets the active template to look fo these associations. The query is more complicated but it works well with main language files, standard files and modules files too.
I'm not opposed to this, but I'm just afraid it's an added complication that might bite back in the future because it's not a well-known feature.

My site - Pro ZC Help
My portfolio | My plugins

5 Jan 2026, 10:20 PM
#20
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,817
Plugin Contributions:
24

Re: Language Manager [Support Thread]

pilou2:

There are still a few things I would like to improve on the 'Create New Language Pack' functionality:

  • It would be nice to be able to clone languages files from another language than English.
    OK, shouldn't be much of a problem.

pilou2:

  • If language files from encapsulated plugins could be cloned too, it would make a perfect base for translators to actually create a complete new language pack.
    I am interested in what you think of that?
    Makes perfect sense to think about encapsulated plugins, but at the same time it opens a HUGE can of worms.
    #1 do EPs support language overrides per template?
    #2 where to store these language files - in the main languages directory or in zc_plugins (relative to the plugin)
    #3 I'm guessing the answer to #2 would be in the plugin's own directory. How to handle this when you create a translation for the current version and a new version comes out which is now in a different directory?

An example:

/zc_plugins/EditOrders/v5.0.2/catalog/includes/languages/english/modules/order_total/lang.ot_misc_cost.php

would the new override go to

zc_plugins/EditOrders/v5.0.2/catalog/includes/languages/english/modules/order_total/responsive_classic/lang.ot_misc_cost.php

or would it be picked up from

/includes/languages/english/modules/order_total/responsive_classic/lang.ot_misc_cost.php

If the latter, beautiful because it would also solve #3

I guess I'll need to test all this out and see what happens because honestly, I have no idea - the number of EPs is ridiculously small at the moment, and most of them don't have much interaction with the frontend anyway.
BUT - if DrByte adopts the idea I mentioned and demonstrated about the Remote Plugins Installer, we might see an increase in EPs so it's definitely worth digging into it.

My site - Pro ZC Help
My portfolio | My plugins