What steps will reproduce the problem? 1. Create a module named 'myModule' 2. Configure the application with 'language'=>'fr_ca' 3. Add a message file to modules/myModule/message/fr_ca/mymessages.php 4. in mymessage.php, add : <?php return array('test'=>'my test'); 5. in a view file, add this line: <?php echo Yii::t('myModule.mymessages','test'); ?>
What is the expected output? What do you see instead? Should output 'my test' by display 'test'.
What version of the product are you using? On what operating system? Yii 1.1a
It's seem that the function that search for the module message file "protected function getMessageFile($category,$language)" is no more in *messageSources classes of Yii 1.1a.
I understand it's in an alpha stage, but it's weird that this function is no more there :P Thanks ;)
Comment #1
Posted on Oct 21, 2009 by Grumpy WombatI should I write "Message translation from module doesn't work with 1.1a in the title... Sorry :P
Comment #2
Posted on Oct 27, 2009 by Helpful CamelThis is expected. At this time, we are not sure whether or not we would add support for this. We will keep an eye on it.
Comment #3
Posted on Jan 2, 2010 by Helpful CamelThis should be working now. Note that you need to use module class name to indicate where to locate the message file, e.g. Yii::t('ModuleClass.mymessages', 'test');
Status: Fixed
Labels:
Priority-Medium
Milestone-1.1.0