0

私は多言語サイトを構築しており、テキストを _('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"))
            );
4

1 に答える 1

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 変数を挿入できるのは良い考えではないようです。

于 2011-12-16T17:21:21.010 に答える