localization and errors

i set user language in method init of base controller- Yii::app()->setLanguage(‘ru’); but if i get system error it display error message using default language in main.php before call init.

so when i must set language?

You can set direcly in the config main: at the beginning of the array write: