This is my config file:
'components' => array(
'messages' => array(
'class' => 'CPhpMessageSource'
),
This is the config file in my module:
<?php $this->breadcrumbs = array($this->module->id); ?>
<?php echo Yii::t('module', 'Module message to be translated'); ?>
$ yiic message … … …config.php creates all messages like
/messages/en:
<?php
/**
* Message translations.
*
* This file is automatically generated by 'yiic message' command.
* It contains the localizable messages extracted from source code.
* You may modify this file by translating the extracted messages.
*
* Each array element represents the translation (value) of a message (key).
* If the value is empty, the message is considered as not translated.
* Messages that no longer need translation will have their translations
* enclosed between a pair of '@@' marks.
*
* Message string can be used with plural forms format. Check i18n section
* of the guide for details.
*
* NOTE, this file must be saved in UTF-8 encoding.
*
* @version $Id: $
*/
return array (
'Module message to be translated' => '',
);
This:
<?php echo Yii::app()->language; ?>
returns ‘en’
so … if I try to set /messages/en/module from
return array (
'Module message to be translated' => '',
);
to
return array (
'Module message to be translated' => '@@@@@',
);
I still see “Module message to be translated” and not “@@@@@”?