What I want to achieve:
- to use multi language url like this:
http://www.your-domain-example.com/en/some-action/<br> http://www.your-domain-example.com/cn/some-action/ - different URLs with different views/text
- 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:
SEO-conform Multilingual URLs + Language Selector Widget (i18n)
for the 2nd:
国际化 (I18N)
When Should Use Of I18N In Application?
for the 3rd:
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.