Hey, guys!
I’m trying to store messages belonging to a module inside the module itself, but when I call Yii::t() the messages doesn’t get translated.
What I’m doing wrong?
I have a module called guestbook and inside guestbook there is the following structure:
messages
|-> pt_br
|->att.php //this file contains all attribute labels for my models inside guestbook module
so, in the model guestbook.models.Guestbook.php:
public function attributeLabels(){
return array(
'guestbookTitle' => Yii::t('guestbook.att', 'Guestbook Title'),
'guestbookText' => Yii::t('guestbook.att', 'Guestbook Text'),
);
}
If I put the messages under application.messages and call Yii::t(‘att’,‘message’) then things work fine.
Could anybody please give a hint?
Thanks
Regards!!