yii 国际化
http://www.yiichina.com/doc/guide/2.0/tutorial-i18n
config/main.php
外层加
'language' => 'en-US', 'sourceLanguage' => 'zh-CN',
components里加
'i18n' => [ 'translations' => [ '*' => [ 'class' => 'yii\i18n\PhpMessageSource', //'basePath' => '/messages', 'fileMap' => [ 'collection' => 'collection.php' ], ], ], ],
简单使用
Yii::t('app', 'This is a string to translate!');
config同级目录下建messages目录