Hi to everyone!
I want to set 2 or more language image in my site for internationalization
I assume the code is Yii::app()->language = $_GET[‘lang’] into the beforeAction() function for any Controller (is it secure? is there better way?)
What code could I write into a viewer-controller (or theme) to show flags which redirect the site to other languages?
for example
www.example.com?r=Controller/Action &var=1&var=2&var=3&lang=english
and when click the user flag for greece then redirect to
www.example.com?r=Controller/Action &var=1&var=2&var=3&lang=greek
If I use Yii::app()->request->requestUri. ‘&lang=english’ or Yii::app()->request->requestUri. ‘&lang=greek’ when i click the link-flag then
added variable ‘lang’ more of one time in the Url
if I use CHtml::link, Yii::app()->controller->id , Yii::app()->controller->action->id and "&lang=greek" (or other language) to generate the appropriate link
then i loose any other variables of Url and $_GET in the next request
What suggest to me?
Thank you in advance.