You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
The issue still exists against the latest master branch of bootstrap-fileinput.
This is not an usage question. I confirm having read the plugin documentation and demos.
This is not a general programming / coding question. (Those should be directed to the webtips Q & A forum).
I have attempted to find the simplest possible steps to reproduce the issue.
I have included a failing test as a pull request (Optional).
Steps to reproduce the issue
We have a multi-language Yii2 application and use FileInput widget. But when the application language (locale to be more precise) Yii::$app->language is set, for example, to uk-UA, the plugin on the page is rendered with the default language (English).
While method \kartik\base\BaseAssetBundle::addLanguage attach to asset correct l10n file (uk.js), widget \kartik\file\FileInput register plugin with "language": "uk-UA". So, variable $.fn.fileinputLocales has key uk, but the plugin requests uk-UA and fallbacks to en.
Prerequisites
master
branch of bootstrap-fileinput.Steps to reproduce the issue
We have a multi-language Yii2 application and use FileInput widget. But when the application language (locale to be more precise)
Yii::$app->language
is set, for example, touk-UA
, the plugin on the page is rendered with the default language (English).While method
\kartik\base\BaseAssetBundle::addLanguage
attach to asset correct l10n file (uk.js
), widget\kartik\file\FileInput
register plugin with"language": "uk-UA"
. So, variable$.fn.fileinputLocales
has keyuk
, but the plugin requestsuk-UA
and fallbacks toen
.The same problem is described in comment
Expected behavior and actual behavior
I was expecting, that when I set the locale for the plugin, it'll correctly fallback to the language part of the locale if possible.
Isolating the problem
The text was updated successfully, but these errors were encountered: