我正在构建一个多语言站点,并以_('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"))
);发布于 2011-12-17 01:21:21
解决方案看起来很简单:
$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变量。
https://stackoverflow.com/questions/8537748
复制相似问题