Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 34
  1. #11
    Join Date
    Jun 2008
    Location
    Japan
    Posts
    345
    Plugin Contributions
    7

    Default 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.

  2. #12
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,751
    Plugin Contributions
    22

    Default Re: Language Manager [Support Thread]

    Quote Originally Posted by pilou2 View Post
    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...

  3. #13
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,751
    Plugin Contributions
    22

    Default Re: Language Manager [Support Thread]

    Quote Originally Posted by pilou2 View Post
    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.

  4. #14
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,751
    Plugin Contributions
    22

    Default Re: Language Manager [Support Thread]

    Quote Originally Posted by pilou2 View Post
    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!

  5. #15
    Join Date
    Jun 2008
    Location
    Japan
    Posts
    345
    Plugin Contributions
    7

    Default 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...

  6. #16
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,751
    Plugin Contributions
    22

    Default Re: Language Manager [Support Thread]

    Quote Originally Posted by pilou2 View Post
    You are quick!
    My wife says the same...

  7. #17
    Join Date
    Jun 2008
    Location
    Japan
    Posts
    345
    Plugin Contributions
    7

    Default 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.

  8. #18
    Join Date
    Jun 2008
    Location
    Japan
    Posts
    345
    Plugin Contributions
    7

    Default 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?

  9. #19
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,751
    Plugin Contributions
    22

    Default Re: Language Manager [Support Thread]

    Quote Originally Posted by pilou2 View Post
    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!

    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.

  10. #20
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,751
    Plugin Contributions
    22

    Default Re: Language Manager [Support Thread]

    Quote Originally Posted by pilou2 View Post
    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.

    Quote Originally Posted by pilou2 View Post
    - 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:
    Code:
    /zc_plugins/EditOrders/v5.0.2/catalog/includes/languages/english/modules/order_total/lang.ot_misc_cost.php
    would the new override go to
    Code:
    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
    Code:
    /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.

 

 
Page 2 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Image Manager [Support Thread]
    By balihr in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 9 Sep 2025, 02:06 AM
  2. v151 Log Manager [Support Thread]
    By lat9 in forum All Other Contributions/Addons
    Replies: 11
    Last Post: 4 Jul 2025, 02:40 PM
  3. Link Manager 3.0 Support Thread
    By clydejones in forum Addon Sideboxes
    Replies: 1987
    Last Post: 6 Aug 2021, 02:56 PM
  4. Testimonial Manager Support Thread
    By clydejones in forum All Other Contributions/Addons
    Replies: 1500
    Last Post: 4 Feb 2021, 04:12 PM
  5. Poll Manager Support Thread
    By boudewijn in forum Addon Sideboxes
    Replies: 148
    Last Post: 27 Jan 2016, 09:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg