You are viewing revision #1 of this wiki article.
This version may not be up to date with the latest version.
You may want to view the differences to the latest version.
What I am want? 1,to use multi language url like this: http://www.your-domain-example.com/en/some-action/ http://www.your-domain-example.com/cn/some-action/ 2,different url with different views/text 3,some contents in DB(database ) could also auto replaced by some language tags.
After looking around on the forum ,and the best multi language extensions or examples I have experience Is as below:
for the 1th http://www.yiiframework.com/wiki/294/seo-conform-multilingual-urls-language-selector-widget-i18n/
for the 2th http://www.yiiframework.com/doc/guide/1.1/zh_cn/topics.i18n http://www.yiiframework.com/forum/index.php/topic/44669-when-should-use-of-i18n-in-application/page__p__211604__hl__i18n#entry211604
for the 3th http://www.yiiframework.com/extension/i18n-columns
I am sure it's very useful tips above to do a multi language site and save time to do yours. I will show here next time.
more fun with search/dbcritical
I also need this:
http://www.yiiframework.com/extension/multilingual-behavior/
To enable search on translated fields, you can modify the search() function in the model like this :
public function search()
{
$criteria=new CDbCriteria; //... //here your criteria definition //... return new CActiveDataProvider($this, array( 'criteria'=>$this->ml->modifySearchCriteria($criteria), //instead of //'criteria'=>$criteria, ));
}
so I have to modifySearchCriteria for my own use.
some patch for migations
to resolove "No new migration found. Your system is up-to-date."
just execute:
yiic migrate create 【tablename】
then yiic migrate
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.