When translating strings in Yii with GetText, do we have to use Yii::t($category,\'message\') or gettext\'s _(\'message\') syntax?
And then how
I use it like this:
when i have for example:
Yii::app()->language = en
in folder messages have I folder en and on this folder I have file lang.php
on this folder lang.php I have for example:
'search',
'example2'=>'news',
);
then when i need call view translate:
=Yii::t('lang','example1');?>
and result is: search
when I change: Yii::app()->language = de, I must have messages/de/lang.php and on this foler I have:
'Suche',
'example2'=>'Nachrichten',
);
then when i need call view translate:
=Yii::t('lang','example1');?>
result is: Suche