Jump to content
Rosi

Prestashop 1.7.5.2 Translations not working

Recommended Posts

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?

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.

Guest
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.


×
×
  • Create New...

Important Information

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