Is Yii really multilanguage


(Gposse) #1

Hi,

I’m trying to build a multilanguage site. Each user should be able to read the site in its own language. I haven’t found the way to do it. It seems that it is not possible to change the application language once the user has been authenticated.


(Waprave) #2

give more details. What is the approach you’re using.


(Marko Bischof) #3

switch language everywhere you want


Yii::app()->language = "de";


(Gposse) #4

I found the solution.

Language can be kept session array and you have to override the init() for the base controller of the application in order to set the app->language from session value.

Thanks


(Contact) #5

Don’t forget indexers like google if you store language in session. Google may store wrong versions or may mix up pages with different languages.