It seems Yii::t can't work with variables. I was wondering is there any solution or workaround to do something like this:
foreach ($dicts as $dict) {
echo Yii::t($dict,$someRandomWord);
}
It seems Yii::t can't work with variables. I was wondering is there any solution or workaround to do something like this:
foreach ($dicts as $dict) {
echo Yii::t($dict,$someRandomWord);
}
Tested it right now. It works fine! I promise, your locales or your $category is unknown/notset. Is your message file ok?
Check this: http://www.yiiframework.com/wiki/243/how-to-translate-and-do-the-translations-the-easy-way/#hh1
//current language is turkey, system language is english
$category = 'app';
$message = 'english';
echo Yii::t($category, $message);
//İngilizce