Reputation: 63
i have a question about i18n with yii2. As i have a pretty big app, i did several files under /backend/messages/en-US like this app.php explication.php delivery.php etc. and i’ve added the code in my config/main.php and i don’t get why only the app.php translations are working. Any string on all other files are not showing… Do you have any idea why ? Or is it possible to work only with app.php ?
Kind regards
my configuration code
'i18n' => [
'translations' => [
'*'=> [
'class' => 'yii\i18n\PhpMessageSource',
'basePath' => '$app/messages',
'sourceLanguage' => 'en-US',
'fileMap' => [
'app' => 'app.php',
'app/maker' => 'maker.php',
'app/producer' => 'producer.php',
'app/product' => 'product.php',
'app/delivery' => 'delivery.php',
'app/explication'=>'explication.php',
'app/faq'=>'faq.php',
'app/greensocial'=>'greensocial.php',
'app/rbac-admin'=>'rbac-admin.php',
'app/yii'=>'yii.php',
'app/error' => 'error.php',
],
],
],
],
Upvotes: 0
Views: 147