Skip to content
This repository was archived by the owner on Oct 1, 2022. It is now read-only.
Volodymyr edited this page Jun 18, 2014 · 1 revision

TranslationManagement

Yii extension for manage translation from CPhpMessageSource

Demo

Install

Just copy directory "TranslationManagement" to your /protected/extensions/ folder.

Or git clone git@github.com:mosvov/TranslationManagement.git

Usage

Simple widget in any view file

$this->widget('application.extensions.TranslationManagement.TranslationManagement',array(
    'default_language'=> 'ru',
    'translated_languages' => ['ru'=>'Russian', 'en'=>'English']
));

Or you can configure message in your config file

    // @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