KItis
KItis

Reputation: 5646

Yii framework: Multi Language Support

I am developing a web site using yii framework which need to be supported in many (may be 3) languages. I have problem with translating error messages that Yii framework returns.

For example how do i translate following error message which is returned by Yii framework when user does not provide correct data to log in.

Thanks in advance for any help

enter image description here

Upvotes: 2

Views: 2457

Answers (1)

schmunk
schmunk

Reputation: 4708

Yii translates the error message like this,

Yii::t('yii','{attribute} cannot be blank.');

So you'd have to create a corresponding message catalogue named 'yii' and update your translations there, for more details see http://www.yiiframework.com/wiki/18/how-to-customize-yii-core-messages/ and http://www.yiiframework.com/doc/guide/1.1/en/topics.i18n

Upvotes: 6

Related Questions