Modules in modules yii::t()

Sorry for my eng.

In yii documentation written that modules can be inclosed in other modules.

if I want to translate messages in module I use this code:


Yii::t('MyModule.source','TEst');

How can I translate messages of submodule of this module:


Yii::t('MyModule.SubModule.source','TEst');

not works.

I want translation chema messages stored in:

/protected/modules/MyModule/modules/SubModule/messages/

Do we have a solution for this now ?

Need the same thing. All I found in the forums didn’t help.

It looks like you can’t use a “full path” to a submodule in t() method. So you should provide only a submodule name:




Yii::t('MySubModule.source', 'TEst');



But make sure this submodule is loaded before using it’s messages.