i am new to Yii framework and i am making my first app with this framework.
I want to use the CGettextMessageSource in order to translate the text of my app, but i am not able to configure it.
In the main.php (in config) i have set this
‘messages’ => array(
‘class’ => ‘CGettextMessageSource’,
In the controller (i use an extension of CController), in the init function i have set this in order to set the language
Yii::app()->language = ‘zh_cn’;
and finally the .po and .mo files are located in
and the files are named
messages.po and messages.mo
when i use Yii::t(‘messages’,‘User name’), i get User name, not 用户名.
if anyone could explain me what i am missing, it would be very appreciated for me.
If you have an example, I wish I could learn from it.
thanks in advance