Jump to content

Use global translations in modul


MrGumby

Recommended Posts

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

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 by MrGumby (see edit history)
Link to comment
Share on other sites

  • 1 year later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...