Jump to content
Sign in to follow this  


Recommended Posts

Posted (edited)

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.

Can you help me? What did I do wrong.



SOLVED-  I must use , __CLASS__) as second parameter in l method.


Edited by SnakeChord (see edit history)

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More