我正在研究prestashop 1.7上的一个模块。
我正在做翻译,但我在前台有个问题。我的后台字符串显示在翻译界面中,而不是前台。
在我的前端办公室的tpl文件中,例如:
<tr>
<th>{l s='Name of the category' d='mynewmodule'}</th>
<th>{l s='Select' d='mynewmodule'}</th>
</tr>但是在翻译界面中什么也没有出现。我很好: Translations -> Installed modules -> mynewmodule
但什么都没有(除了后台的那些)
谢谢你的帮助。彼得。
发布于 2017-03-07 23:58:54
目前,你必须使用“旧”系统。
{l s='Name of the category' mod='mynewmodule'}这就是目前的一切。开发人员正在努力将所有的翻译系统转移到symfony的新的“嵌入式”系统。
发布于 2017-03-08 15:04:57
如果你想通过prestashop 1.7翻译系统翻译文本,请遵循以下步骤:
//模块名称必须是start ps_。//您的模块名称应该出现在prestashop转换域名之后。
//您可以将所有的prestashop域从print_r($this->context->getTranslator()->getCatalogue()->all())获取到此代码。
//如果域名为shoppingcart,则原始模块名应为ps_shoppingcart。
//在此之后,如果您在该模块上使用{l s='translate text' d='domain'}此系统,则它将转换prestashop 1.7.x.x系统。
//您可以在这里查看prestashop核心代码:root\controllers\admin\AdminTranslationsController.php this file isUsingNewTranslationsSystem()函数。
https://stackoverflow.com/questions/42652327
复制相似问题