Yii extension for manage translation from CPhpMessageSource
Just copy directory "TranslationManagement" to your /protected/extensions/ folder.
Or git clone [email protected]:mosvov/TranslationManagement.git
$this->widget('application.extensions.TranslationManagement.TranslationManagement',array(
'default_language'=> 'ru',
'translated_languages' => ['ru'=>'Russian', 'en'=>'English']
));
// @usage Yii::app()->params['paramName']
'params'=>array(
'translatedLanguages'=>array(
'ru' => 'Русский',
'en' => 'English',
'zh' => '中国的',
'ar' => 'العربية'
),
'defaultLanguage'=>'ru',
)
then you can include widget like this
$this->widget('application.extensions.TranslationManagement.TranslationManagement');
For work it needs completely generated message in message directory. Full guide to generate message you can found here http://www.yiiframework.com/doc/guide/1.1/fr/topics.i18n