Use Translation Of Another Module

Dear,

How can I use a translation string of another module?

My translation files are located at /application/modules/admin/messages/nl/general.php.

Yii::t(‘adminModule.general’, ‘My string’); is what I am using on both locations, from within the admin module this is working properly, but from another module I’ll get an error;


include(adminModule.php): failed to open stream: No such file or directory 

How can i access these from another module?

Why would you do so in the first place? If a translation is used in more then one module, it seems it should be placed a level higher… Never tried it, but this post suggests to import the messages in your module. It also explains how to do so.

I need to use a model from another module, but in this model i translated all labels with Yii:t(). The model itself is working from the other module, but only the translations are not.

Import doesn’t work.