Hello.
I created a simple module for PS. I tried to localize this module.
When I am in the localization page I see.
MYLOANCONNECTOR -> my main.php file
MLCCONFIG -> my second file with some static values
Result of generation file:
global $_MODULE; $_MODULE = array();
$_MODULE['<{myloanconnector}prestashop>myloanconnector_45ede5b149bf7c7fa0507a1617393da3'] = 'xxxxxxx'; $_MODULE['<{myloanconnector}prestashop>mlcconfig_9810fe391f2e0a0d0644004e1073321e'] = 'xxxxxxx';
But if I try to get localization in mlcconfig.php file:
$module = Module::getInstanceByName('myloanconnector'); /
/ Init Fields form array $fields_form = []; $fields_form[0]['form'] = [ 'legend' => [ 'title' => $module->l('xxxxxxx'), ],
I don't get the localization text.
Why?
Can you help me? What did I do wrong.
SOLVED- I must use , __CLASS__) as second parameter in l method.