Closed RochaXavier closed 5 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi guys! I'm facing the same problem trying to set up 'pt-BR' language. It appears to be the same related by @RochaXavier.
My app is currently set up with config Yii::$app->language => 'pt-BR' according to Yii2 Guide - i18n.
Some tests:
Yii::$app->language => 'pt-BR'
renders 'en'Yii::$app->language => 'pt-br'
(which according to the Yii2 guide is incorret) renders 'pt' (from Portugal not Brazil)->widget(FileInput::class, ['language' => 'pt-BR', ...]
still renders 'en'->widget(FileInput::class, ['language' => 'pt-br', ...]
renders 'pt' (from Portugal not Brazil)->widget(FileInput::class, ['language' => 'pt', ...]
renders 'pt' (from Portugal not Brazil)->widget(FileInput::class, ['language' => 'br', ...]
renders 'en'Is that a bug, or what am I doing wrong? @RochaXavier, did you find the solution?
Thank you!
I try to translate the plugin with yii2 widget, but it doesn't work:
When I try with another language it works, only 'pt-BR' and 'zh-TW' don't.
Looking at the network panel, the file is loaded correctly "/web/assets/d32e62c3/js/locales/pt-BR.js" but the script wrinten by widget sets language to "pt" as follows.
Yii version: 2.0.19 Jquery version: 3.3.1 bootstrap-fileinput version: 5.0.3