首页 文章

Prestashop 1.7 - 我的翻译没有出现在翻译界面中

提问于
浏览
0

我正在研究prestashop 1.7上的一个模块 .

我正在翻译,但前台办公室有问题 . 我的后台字符串出现在翻译界面中,但不出现在前台办公室 .

我在前台办公室的tpl文件中有例如:

<tr>
    <th>{l s='Name of the category' d='mynewmodule'}</th>
    <th>{l s='Select' d='mynewmodule'}</th>
</tr>

但是翻译界面中没有任何内容 . 我很好:翻译 - >已安装的模块翻译 - > mynewmodule

但没有(除了后台的那些)

谢谢您的帮助 . 彼得 .

2 回答

  • 0

    目前你必须使用'旧'系统 .

    {l s='Name of the category' mod='mynewmodule'}
    

    这一切都是暂时的 . 开发人员正在努力将所有翻译系统转移到symfony的新“嵌入式”系统 .

  • 1

    如果您想通过prestashop 1.7翻译系统翻译文本,请按照以下步骤操作:

    //您的模块名称必须是 ps_ . //您的模块名称应出现在prestashop翻译域名之后 .

    //您可以从 print_r($this->context->getTranslator()->getCatalogue()->all()) 获取所有prestashop域到此代码 .

    //如果域名为 shoppingcart ,那么您的原始模块名称应为 ps_shoppingcart .

    //之后如果您在该模块上使用了 {l s='translate text' d='domain'} 这个系统,那么它将翻译prestashop 1.7.x.x系统 .

    //你可以在这里看到prestashop核心代码: root\controllers\admin\AdminTranslationsController.php this file isUsingNewTranslationsSystem() function .

相关问题