我正在构建一个多语言网站,并以_('mytext')或_(“mytext”)的形式显示我的文本,以便Poedit可以识别它并将其添加到我的待处理翻译中。除非删除{$form->getValue('email')}
部分,否则为什么下面的文字无法识别?我如何修改它,以便Poedit选择它?
$this->view->errors = array(
array(_("{$form->getValue('email')} is already registered with this site. If you have
forgotten your password, click on the link and we will send you a new one"))
);
答案 0 :(得分:0)
解决方案似乎很简单:
$this->view->errors = array(
array($form->getValue('email') . _(" is already registered with this site. If you have
forgotten your password, click on the link and we will send you a new one"))
);
至于为什么,我不确定,但是任何人都可以使用像poedit这样的程序注入php变量似乎不是一个好主意。