language selector

is there a best practice to write a write a language selector?

i was thinking to make every link to finish with /en.html,

but i can`t figure out how to make the function createUrl postfix automaticly the url

if i`m still here, which is better to use CHtml::link and Yii::app()->createUrl ?

thanks in advance:)

I prefer using this way

Hi Cosmin,

I prefer include the lang in the URL, so a copy/paste would preserve lang. I’ve adapted this extension and it works fine.



thanks for the replies

i prefer the url way because of the copy/paste and for crawlers(same url, diffrent languages)

that extencions looks great i`m gonna steal some ideas from there