SnakeChord Posted October 2, 2019 Share Posted October 2, 2019 (edited) 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. Edited October 3, 2019 by SnakeChord (see edit history) 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