How to do this simple multi language page (best practise)?

Hi, my yii app homepage content shows "Welcome Home!"

I would like to have a language selector on top of the content which will show different language’s content according to the selection, something like

English|中文

Welcome Home!

English|中文

欢迎!

What’s the best way to do this?

Hi,

Take a look here, http://www.eha.ee/labs/yiiplay/index.php/en/site/extension?view=langmenu

cya,

soter

Hi, i notice your sample code

$this->widget(‘ext.components.language.XLangMenu’, array(

'items'=>array('et'=>'Eesti','en'=>'In English'),


'hideActive'=>false,

));

If i change to

$this->widget(‘ext.components.language.XLangMenu’, array(

'items'=>array('zh'=>'中文','en'=>'English'),


'hideActive'=>false,

));

the editor cannot save the source code file due to the word ‘中文’

:(

Can/Is your editor saving to UTF, or ASCII?

Yup, i save the file with notepad in UTF-8 format and works fine now.

Other than Soter’s i also found a few ways to do this

http://www.yiiframework.com/extension/langurlmanager/#hh3

http://www.yiiframework.com/wiki/26/

Which one is the best practise?

Just for info i end up using this

http://www.yiiframework.com/wiki/294/seo-conform-multilingual-urls-language-selector-widget-i18n/

very clear explaination and instructions.

Anyway, thanks all for the advices.