edk
(Edwardkoo)
1
My config as below
'sourceLanguage'=>'en',
'language'=>'en',
And this works fine,
Yii::app()->language = 'zh';
echo Yii::t('general', 'test');
But this does not work!? I was expecting a zh translated word but it returns the english word.
echo Yii::t('general', 'test', 'en', 'zh'); // not working
echo Yii::t('general', 'test', 'zh', 'en'); // ditto
drmovi
(Drmovi)
2
make sure to create a translation file for your language
edk
(Edwardkoo)
3
There is already a translation file in place and working fine. With this code
Yii::app()->language = 'zh';
echo Yii::t('general', 'test');
I will get the zh version of the word.