Rosi Posted September 19, 2019 Share Posted September 19, 2019 I have a smartblog module, and the text translations do not work at all in it. In PHP scripts, neither of these codes works: class smartblog extends Module { public $nrl; public function __construct() { $this->nrl = $this->trans('Name is required.', array(), 'Modules.Smartblog.Shop'); $this->nrl = $this->trans('Name is required.', array(), 'Modules.Smartblog'); $this->nrl = Context::getContext()->getTranslator()->trans('Name is required.', array(), 'Modules.Smartblog.Shop'); $this->nrl = Context::getContext()->getTranslator()->trans('Name is required.', array(), 'Modules.Smartblog'); } } In tpl. it is not such an issue, as the translations can be exported to an .xlf file. It is insane to see such number of problems with the Prestashop translation system, it is a complete disaster. Can you tell me what the problem might be? 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