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.
Page 1 of 1
Is Yii really multilanguage
#2
Posted 27 February 2010 - 08:24 AM
TAQTICA, on 27 February 2010 - 08:12 AM, said:
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.
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.
give more details. What is the approach you're using.
php:
foreach(array('cat', 'dog', 'cow') as $animal) echo $animal."\n";
python:
[(animal, print(animal)) for animal in ['cat', 'dog', 'cow']]
ruby:
['cat', 'dog', 'cow'].each {|animal| puts animal}
You say Tomato, I say Tomato.
#3
Posted 27 February 2010 - 08:28 AM
switch language everywhere you want
Yii::app()->language = "de";
#4
Posted 27 February 2010 - 09:44 AM
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
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
#5
Posted 27 February 2010 - 03:01 PM
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.
Share this topic:
Page 1 of 1

Help












