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

Prestashop 1.7 - My translation does not appear in the translation interface

我正在 prestashop 1.7 上开发一个模块。

我正在做翻译,但前台有问题。 我的后台字符串出现在翻译界面,但前台没有。

例如,我在前台的 tp​​l 文件中有:

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

但是翻译界面什么也没有出现。 我很好:翻译 -> 安装的模块翻译 -> mynewmodule

但是什么都没有(除了后台)

感谢您的帮助。彼得.

目前您必须使用'old'系统。

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

暂时就这些。开发人员正在努力将所有翻译系统移动到 symfony 的新 'embedded' 系统。

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

// 你的模块名称必须是 start 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() 函数 .