MrGumby Posted September 21, 2014 Share Posted September 21, 2014 Hello fellow PrestaShoppers! I have one particularly usefull question: When one writes a module, can he use global translations? For example, there already exists translation like "(tax incl.)" in global PrestaShop translations, right? So why define new one in my module? It'll be waste of resources. But use (in smarty) {l s='(tax incl.)'} without defining mod='...' does not work. If there exists any way, how to use global translations in modules, it will be great! Link to comment Share on other sites More sharing options...
vekia Posted September 21, 2014 Share Posted September 21, 2014 sometimes context decides what you exactly mean. in addition each language has got own gramatical rules, so for some of the languages and some context {l s='(tax incl.)'} will not be always just "tax incl." but something else Link to comment Share on other sites More sharing options...
MrGumby Posted September 21, 2014 Author Share Posted September 21, 2014 (edited) Hello vekia, you are right, that at many circumstances, concatenate translations together could result in confusing meaning, that's for sure. But there are moments, where it could save some time and storage space. After some research, i do not think, that using other translations from templates will ever be possible. On the other hand, in module class, one could call static methods of class Translate, to get AdminTranslation or PdfTranslation, but it is not very comfortable (i.e. one need to know admin controller, where this translation is used), but it could be somehow utilized. The problem is, I did not found method for front office translations, do you know, where it is? Edited September 21, 2014 by MrGumby (see edit history) Link to comment Share on other sites More sharing options...
jordisan (Jordi S.) Posted August 19, 2016 Share Posted August 19, 2016 For global translations I implemented this solution that might work for you: https://www.prestashop.com/forums/topic/550497-global-translations-solution/ Regards. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now