Hi!
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 :
'sourceLanguage'=>'en_us'
and
'language'=>'en_us'
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){
Yii::app()->setLanguage($language);
$this->redirect(Yii::app()->homeUrl);
}
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.