how can I configure YII i18n feature to use gettex

2019-05-09 23:15发布

I installed the yii-web-start extension, it uses a database for message translation, but I need use gettext instead.

Where and how can I configure YII-i18n?

1条回答
萌系小妹纸
2楼-- · 2019-05-10 00:05

You can set up i18n in your config (protected/config/main.php) with CGettextMessageSource to use gettext.

'components' => array(
    'messages' => array(
        'class' => 'CGettextMessageSource'
     )
 ),

By default, you should store your .po-files under protected/messages.

查看更多
登录 后发表回答