In a view:
echo Yii::t('skate','Good Morning');
In config\web.php:
'bootstrap' => ['log'],
'language' => 'pt',
'sourceLanguage' => 'en_us',
'components' => [
...
'i18n' => [
'translations' => [
'*' => [
'class' => 'yii\i18n\PhpMessageSource',
],
],
],
...
In vendor/yiisoft/yii2/messages/pt/skate.php:
<?php
return [
'Good Morning' => 'Bom Dia',
];
Can anyone please help me why the string is not getting translated?