App language reseted after redirect

Hi everybody!

I’m new to Yii, and I have noticed that when I set the app language in a controller, to use translated messages, and then a redirect to another one, it does not keep the language applied in the first one, it applies the target language in my config file… is there a way to avoid this?

Thanks in advance!

You need to look at this extension: http://www.yiiframework.com/extension/langhandler/

I all depends how you pass the language to your application… I assume yo upass it as a GET variable… but on the redirect you forget to pass that variable…

So one solution would be to pass the language variable even to the redirected URL… or to store the language value in session…

Thanks for the responses!!! Now it’s working!

Would be nice if you can write more about how you solved this… so that other users visiting this thread (maybe with same problem) can get some new ideas…