Peter_17 Posted 3 hours ago Share Posted 3 hours ago (edited) Prestashop 8.2.3 New translation system I try to translate English text to other languages inside module: $language = 'pl-PL'; $translation_en_US = 'new element'; $translation_pl_PL = Context::getContext()->getTranslator()->trans($translation_en_US, [], 'Modules.Mymodule.Myfile', $language); and I always get English version of the text. It does not matter which English text I try to translate, it does not work. Other automatic translations of the string 'new element' to front side and back office work good. All other automatic translations of the strings to front side and back office work good. Possibly I can use a function: getModuleTranslation from the file: https://github.com/PrestaShop/PrestaShop/blob/8.2.x/classes/Translate.php but I am not sure how. I can write my own function to translate, for example like this:https://github.com/PrestaShop/PrestaShop/issues/13024 How can I solve this problem? Edited 3 hours ago by Peter_17 Solved (see edit history) Link to comment Share on other sites More sharing options...
Mediacom87 Posted 3 hours ago Share Posted 3 hours ago Hi, with this doc : https://devdocs.prestashop-project.org/8/modules/creation/module-translation/new-system/ Link to comment Share on other sites More sharing options...
Peter_17 Posted 3 hours ago Author Share Posted 3 hours ago Hi Mediacom87, thanks for help. I just made a mistake in a string "Modules.Mymodule.Myfile". 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