问题
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:
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.
来源:https://stackoverflow.com/questions/6735670/how-can-i-configure-yii-i18n-feature-to-use-gettext