Merge pull request #1026 from JensRantil/translation-process-improvements
Translation process improvements
This commit is contained in:
commit
3b6766c14e
10
README.md
10
README.md
@ -36,6 +36,15 @@ Integrations
|
||||
* [Django](https://github.com/applegrew/django-select2)
|
||||
* [Symfony](https://github.com/19Gerhard85/sfSelect2WidgetsPlugin)
|
||||
|
||||
Internationalization (i18n)
|
||||
---------------------------
|
||||
|
||||
Select2 supports multiple languages by simply including the right
|
||||
language JS file (`select2_locale_it.js`, `select2_locale_nl.js` etc.).
|
||||
|
||||
Missing a language? Just copy `select2_locale_en.js.template`, translate
|
||||
it and make a pull request back to Select2 here on Github.
|
||||
|
||||
Bug tracker
|
||||
-----------
|
||||
|
||||
@ -43,7 +52,6 @@ Have a bug? Please create an issue here on GitHub!
|
||||
|
||||
https://github.com/ivaynberg/select2/issues
|
||||
|
||||
|
||||
Mailing list
|
||||
------------
|
||||
|
||||
|
17
select2_locale_en.js.template
Normal file
17
select2_locale_en.js.template
Normal file
@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Select2 <Language> translation.
|
||||
*
|
||||
* Author: Your Name <your@email>
|
||||
*/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
|
||||
$.extend($.fn.select2.defaults, {
|
||||
formatNoMatches: function () { return "No matches found"; },
|
||||
formatInputTooShort: function (input, min) { var n = min - input.length; return "Please enter " + n + " more character" + (n == 1 ? "" : "s"); },
|
||||
formatInputTooLong: function (input, max) { var n = input.length - max; return "Please enter " + n + " less character" + (n == 1? "" : "s"); },
|
||||
formatSelectionTooBig: function (limit) { return "You can only select " + limit + " item" + (limit == 1 ? "" : "s"); },
|
||||
formatLoadMore: function (pageNumber) { return "Loading more results..."; },
|
||||
formatSearching: function () { return "Searching..."; }
|
||||
});
|
||||
})(jQuery);
|
Loading…
Reference in New Issue
Block a user