Closed aliechti closed 9 years ago
Nothing is translated by default, because the language is not passed to the bootstrap-fileinput. The translation file is loaded but the bootstrap-fileinput language is set to default.
language
A workaround is to set it manually at every fileinput
<?= $form->field($article, 'file')->widget(FileInput::className(), [ 'pluginOptions' => [ 'language' => Yii::$app->language ], ]) ?>
To fix it, I think it should be set at the widget init()
init()
if (!isset($this->pluginOptions['language'])) $this->pluginOptions['language'] = $this->language;
Resolved via d96e605.
Nothing is translated by default, because the
language
is not passed to the bootstrap-fileinput. The translation file is loaded but the bootstrap-fileinput language is set to default.A workaround is to set it manually at every fileinput
To fix it, I think it should be set at the widget
init()