Closed ChrisWeit closed 4 years ago
You need to add a i18n component to your app configuration
The key (in the example above app*) could be either * (wildcard for every category) or cookie-consent
Example for PhpMessageSource:
...
'i18n' => [
'translations' => [
'cookie-consent' => [
'class' => \yii\i18n\PhpMessageSource::class,
'basePath' => '@app/messages' // base path of your message file
'sourceLanguage' => 'en'
]
]
]
...
For further informations see docs: https://www.yiiframework.com/doc/api/2.0/yii-i18n-phpmessagesource
Example for DbMessageSource:
...
'i18n' => [
'translations' => [
'cookie-consent' => [
'class' => \yii\i18n\DbMessageSource::class,
'sourceLanguage' => 'en'
]
]
]
...
For further informations see docs: https://www.yiiframework.com/doc/api/2.0/yii-i18n-dbmessagesource
@germanbisurgi We should to add this to the projects readme!
Thanks for the answer.
Hi, sorry to post this, but I just don't know what I have to do here.
I get:
as an error message.
Anyone an idea what I need to fix? (I just installed and copy pasted component, use ..., and widget)
Thanks.