Yii: GetText _() vs Yii::t()

前端 未结 4 1148
温柔的废话
温柔的废话 2021-01-21 18:32

When translating strings in Yii with GetText, do we have to use Yii::t($category,\'message\') or gettext\'s _(\'message\') syntax?

And then how

4条回答
  •  孤独总比滥情好
    2021-01-21 19:10

    I always use Yii::t('xx','yy') in order to have more control on localization. I can split in more file under

    message/LANG/file.php
    

    with

     'localized',
      );
    ?>
    

    This for Yii Framework 1.x

提交回复
热议问题