Magento :: Translate text from javascript files

后端 未结 4 2096
予麋鹿
予麋鹿 2021-02-08 18:16

Magento uses a system for translating text in the template files using:

$this->__(\'text to be translated.\');

or

Mage::helper(\

4条回答
  •  春和景丽
    2021-02-08 19:10

    This is the correct way for translating JavaScript strings withing .phtml file

    Translator.add({"To be translated":"_('To be translated'); ?>"});
    

    Update: fixed typo.

提交回复
热议问题