php - Translating field data in yii -
i have table named item has field named description. using yii framework, , want translate data of field description according language set admin. how can this?
in order leverage yii framework this, want at: http://www.yiiframework.com/doc/guide/1.1/en/topics.i18n
in particular, sounds want use cdbmessagesource
you either want store sourcemessage.messsage
key in description column, , use yii::t() translate it, or generate key dynamically based on model's class name, primary key, , column name , use yii:t().
Comments
Post a Comment