kartik-v / bootstrap-fileinput

An enhanced HTML 5 file input for Bootstrap 5.x/4.x./3.x with file preview, multiple selection, and more features.
http://plugins.krajee.com/file-input
Other
5.36k stars 2.4k forks source link

Language is not loaded #1841

Open ProjectLinde37 opened 1 year ago

ProjectLinde37 commented 1 year ago

Problem still not seems solved in latest version

Loaded following files : `

<script type='text/javascript' src='assets/bootstrap-fileinput/5.5.3/js/locales/nl.js>`

And have the input configured $(document).ready(function() { $('#DOCUMENT').fileinput({ language:'nl', 'showUpload': false, 'previewFileType': 'any', // custom button icons }); });

TeoMastro commented 1 year ago

In my case, the way our company project is constructed we store the language and locale in Yii::$app->language (ex. 'el-GR' for greek). On Datepicker plugin the language value was automatically taken from the Yii::$app->language variable, but on the bootstrap-fileinput plugin I had to set the language by adding the property: 'language' => substr(Yii::$app->language, 0, 2) on the fileinput plugin properties so only the 'el' part was cosnidered as 'language' by the plugin. I hope this helps you identify and solve your problem.