Skip to content
This repository has been archived by the owner on Oct 1, 2022. It is now read-only.

mosvov/TranslationManagement

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TranslationManagement

Yii extension for manage translation from CPhpMessageSource

Demo

Install

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

Or git clone [email protected]: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