language definition


I have a problem with language definition in my Yii application.

I want enable the user to choise the language (frrench and english).

In my config/main.php I have :




I have an action in SiteController which is executed when the user whant to change the application language :


         * Set the user language


        public function actionSetLanguage($language){




In my view/site/index.php which correspond to homeUrl, i have done :

echo Yii::app()->getLanguage();


It displays ‘en_us’ even if I despite the fact that i call actionSetLanguage(‘fr_fr’).

What could be the problem?

Thanks for your help.

Duplicate post: ansere here.