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?
.png.022b5452a8f28f552bc9430097a16da2.png)