Module 如何通过php从prestashop中的模块翻译字符串?

Module 如何通过php从prestashop中的模块翻译字符串?,module,translation,prestashop-1.6,Module,Translation,Prestashop 1.6,我正在建造一个新的模块。正如文档中所述,我在模块的函数中使用l,语法如下: $subtitles = array( '22' => $this->l('Per acquisti superiori ai 50€'), '23' => $this->l('30 giorni per sostituire o rendere') ); 我还可以在后台翻译页面上查看、编辑和保存这些句子 但是如果我查一下字幕[22],我总是得到意大利语版本,而不是英语版本。注意

我正在建造一个新的模块。正如文档中所述,我在模块的函数中使用l,语法如下:

$subtitles = array(
    '22' => $this->l('Per acquisti superiori ai 50€'),
    '23' => $this->l('30 giorni per sostituire o rendere')
);
我还可以在后台翻译页面上查看、编辑和保存这些句子

但是如果我查一下字幕[22],我总是得到意大利语版本,而不是英语版本。注意,我还检查了$this->context->language->id是否对应于英语


那么这里有什么问题呢?

好的,不,这是正确的方法。我的问题只是我是呃。。在后台选择错误的语言进行翻译。。对不起。

这段代码是在钩子方法中吗?