Stainton Posted September 3, 2015 Share Posted September 3, 2015 I need to override a class and a template. To achieve this, I choose to create a new module in order to not be blocked when Prestashop will update. For overriding class, I don't have problem. The worry is in overriding template, fields are in English whereas in the rest of my website, they are in French (when I uninstall the module, they come back in French). In my module, I override the template with this way :public function hookDisplayOverrideTemplate($params){$controllerName = get_class($params['controller']);$tpl = $this->local_path . 'override/tpl/' . $controllerName . '.tpl';if (file_exists($tpl)){return $tpl;}return false;}In my .tpl file, the fields which are not translate are like this :{l s='Your addresses'}So, I tried to insert the fr.php file in /my_module/translations/fr.php, and I edited it :<?phpglobal $_MODULE;$_MODULE = array();$_MODULE['<{customaddresses}prestashop>customaddresses_3908e1afa0ff22fbf112aff3c5ba55c1'] = 'Vos adresses';Then, I modified the .tpl file :{l s='Your addresses' mod='customaddresses'}My fields are still in English. Someone has a solution to suggest ? Link to comment Share on other sites More sharing options...
vekia Posted September 3, 2015 Share Posted September 3, 2015 module translation files are probably in the theme directory, verify it Link to comment Share on other sites More sharing options...
Stainton Posted September 4, 2015 Author Share Posted September 4, 2015 Yes it is. But I tried to copy it in my module folder, but it still doesn't work. 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