Krajee

Multi Language Demo

Thankful to Krajee! BUY A COFFEEor to get more out of us.

The fileinput plugin supports rendering of multiple language widgets on the same page. To do this, follow these simple steps:

  • Load all the respective locale JS files for the locale languages you need (e.g. js/locales/ru.js for Russian). These must be loaded after the fileinput.js.

  • Set the language property in the plugin to the language you need (e.g. 'ru').

Tip

Not seeing the updated content on this page! Hard refresh your browser to clean cache for this page (e.g. SHIFT-F5 on Windows Chrome)

Setting a Russian File upload widget.
<!-- RUSSIAN FILE INPUT -->
<!-- load the JS files in the right order -->
<script src="/path/to/js/fileinput.js"></script>
<script src="/path/to/js/locales/ru.js"></script>

<label class="control-label">Выберите Файл</label>
<div class="file-loading">
    <input id="input-ru" name="inputru[]" type="file" multiple>
</div>
<script>
$("#input-ru").fileinput({
    language: "ru",
    uploadUrl: "/file-upload-batch/2",
    allowedFileExtensions: ["jpg", "png", "gif"]
});
</script>
Setting a French File upload widget.
<!-- FRENCH FILE INPUT -->
<!-- load the JS files in the right order -->
<script src="/path/to/js/fileinput.js"></script>
<script src="/path/to/js/locales/fr.js"></script>

<label class="control-label">Sélectionnez Fichier</label>
<div class="file-loading">
    <input id="input-fr" name="inputfr[]" type="file" multiple>
</div>
<script>
$("#input-fr").fileinput({
    language: "fr",
    uploadUrl: "/file-upload-batch/2",
    allowedFileExtensions: ["jpg", "png", "gif"]
});
</script>
Setting a Portugese (Brazilian) File upload widget.
<!-- PORTUGESE (BRAZILIAN) FILE INPUT -->
<!-- load the JS files in the right order -->
<script src="/path/to/js/fileinput.js"></script>
<script src="/path/to/js/locales/pt-BR.js"></script>

<label class="control-label">Selecione O Arquivo</label>
<div class="file-loading">
    <input id="input-pt-br" name="inputptbr[]" type="file" multiple>
</div>
<script>
$("#input-pt-br").fileinput({
    language: "pt-BR",
    uploadUrl: "/file-upload-batch/2",
    allowedFileExtensions: ["jpg", "png", "gif"]
});
</script>

Note

You can now visit the Krajee Webtips Q & A forum for searching OR asking questions OR helping programmers with answers on these extensions and plugins. For asking a question click here. Select the appropriate question category (i.e. Krajee Plugins) and choose this current page plugin in the question related to field.

The comments and discussion section below are intended for generic discussions or feedback for this plugin. Developers may not be able to search or lookup here specific questions or tips on usage for this plugin.

 
visitors to Krajee Jquery Plugins since 22-May-2017