[英]Why is yiic message ignoring yii::t() new strings?
在索引控制器上,我有以下新翻譯:
$this->pageTitle = yii::t('sitename','what we do');
Yii::app()->clientScript->registerMetaTag(yii::t('sitename','foo bar foo foo bar'), 'description');
Yii::app()->clientScript->registerMetaTag(yii::t('sitename','foo, bar, foo, bar'), 'keywords');
然后轉到命令行,運行:
./yiic message ../app/messages/config.php
我得到:
將消息保存到/Users/user/Sites/sitename.dev/app/messages/en/sitename.php ...沒有新內容...已跳過。
這是我的應用程序消息/ config.php
文件:
/**
* This is the configuration for generating message translations
* for the Yii framework. It is used by the 'yiic message' command.
*/
return array(
'language'=>'pt',
'sourcePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'../..',
'messagePath'=>dirname(__FILE__),
'languages'=>array('en'),
'fileTypes'=>array('php'),
'overwrite'=>true,
'exclude'=>array(
'.svn',
'/app/data/i18n',
'/htdocs',
'/app/tests',
'/app/messages',
'/app/config',
),
);
有人可以幫我弄清楚為什么會這樣嗎?
找到了。
字母的大小寫很重要。 我錯誤地使用了yii::t();
而不是Yii::t();
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.