1
0
mirror of synced 2024-11-22 21:16:10 +03:00
Instead of instantly applying the translations, add them to an array.
That way users can include the language files that their site supports
and apply the required language using $.extend($.fn.select2.defaults,
$.fn.select2.locales["nl"]);

Signed-off-by: Kevin Brown <kevin@kevinbrown.in>
This commit is contained in:
Jonas Pyfferoen 2014-04-15 09:20:22 +02:00 committed by Kevin Brown
parent 79b5bf6db9
commit 837715f939
45 changed files with 59 additions and 52 deletions

View File

@ -3425,14 +3425,6 @@ the specific language governing permissions and limitations under the Apache Lic
}, },
formatResultCssClass: function(data) {return data.css;}, formatResultCssClass: function(data) {return data.css;},
formatSelectionCssClass: function(data, container) {return undefined;}, formatSelectionCssClass: function(data, container) {return undefined;},
formatMatches: function (matches) { if (matches === 1) { return "One result is available, press enter to select it."; } return matches + " results are available, use up and down arrow keys to navigate."; },
formatNoMatches: function () { return "No matches found"; },
formatAjaxError: function (jqXHR, textStatus, errorThrown) { return "Loading failed"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Please enter " + n + " or more character" + (n == 1? "" : "s"); },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Please delete " + n + " 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…"; },
minimumResultsForSearch: 0, minimumResultsForSearch: 0,
minimumInputLength: 0, minimumInputLength: 0,
maximumInputLength: null, maximumInputLength: null,
@ -3471,6 +3463,21 @@ the specific language governing permissions and limitations under the Apache Lic
} }
}; };
$.fn.select2.locales = [];
$.fn.select2.locales['en'] = {
formatMatches: function (matches) { if (matches === 1) { return "One result is available, press enter to select it."; } return matches + " results are available, use up and down arrow keys to navigate."; },
formatNoMatches: function () { return "No matches found"; },
formatAjaxError: function (jqXHR, textStatus, errorThrown) { return "Loading failed"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Please enter " + n + " or more character" + (n == 1 ? "" : "s"); },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Please delete " + n + " 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…"; },
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['en']);
$.fn.select2.ajaxDefaults = { $.fn.select2.ajaxDefaults = {
transport: $.ajax, transport: $.ajax,
params: { params: {

View File

@ -6,7 +6,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['ar'] = {
formatNoMatches: function () { return "لم يتم العثور على مطابقات"; }, formatNoMatches: function () { return "لم يتم العثور على مطابقات"; },
formatInputTooShort: function (input, min) { var n = min - input.length; if (n == 1){ return "الرجاء إدخال حرف واحد على الأكثر"; } return n == 2 ? "الرجاء إدخال حرفين على الأكثر" : "الرجاء إدخال " + n + " على الأكثر"; }, formatInputTooShort: function (input, min) { var n = min - input.length; if (n == 1){ return "الرجاء إدخال حرف واحد على الأكثر"; } return n == 2 ? "الرجاء إدخال حرفين على الأكثر" : "الرجاء إدخال " + n + " على الأكثر"; },
formatInputTooLong: function (input, max) { var n = input.length - max; if (n == 1){ return "الرجاء إدخال حرف واحد على الأقل"; } return n == 2 ? "الرجاء إدخال حرفين على الأقل" : "الرجاء إدخال " + n + " على الأقل "; }, formatInputTooLong: function (input, max) { var n = input.length - max; if (n == 1){ return "الرجاء إدخال حرف واحد على الأقل"; } return n == 2 ? "الرجاء إدخال حرفين على الأقل" : "الرجاء إدخال " + n + " على الأقل "; },

View File

@ -7,7 +7,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['bg'] = {
formatNoMatches: function () { return "Няма намерени съвпадения"; }, formatNoMatches: function () { return "Няма намерени съвпадения"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Моля въведете още " + n + " символ" + (n > 1 ? "а" : ""); }, formatInputTooShort: function (input, min) { var n = min - input.length; return "Моля въведете още " + n + " символ" + (n > 1 ? "а" : ""); },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Моля въведете с " + n + " по-малко символ" + (n > 1 ? "а" : ""); }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Моля въведете с " + n + " по-малко символ" + (n > 1 ? "а" : ""); },

View File

@ -6,7 +6,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['ca'] = {
formatNoMatches: function () { return "No s'ha trobat cap coincidència"; }, formatNoMatches: function () { return "No s'ha trobat cap coincidència"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Introduïu " + n + " caràcter" + (n == 1 ? "" : "s") + " més"; }, formatInputTooShort: function (input, min) { var n = min - input.length; return "Introduïu " + n + " caràcter" + (n == 1 ? "" : "s") + " més"; },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Introduïu " + n + " caràcter" + (n == 1? "" : "s") + "menys"; }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Introduïu " + n + " caràcter" + (n == 1? "" : "s") + "menys"; },

View File

@ -12,7 +12,7 @@
3: function() { return "tři"; }, 3: function() { return "tři"; },
4: function() { return "čtyři"; } 4: function() { return "čtyři"; }
} }
$.extend($.fn.select2.defaults, { $.fn.select2.locales['cs'] = {
formatNoMatches: function () { return "Nenalezeny žádné položky"; }, formatNoMatches: function () { return "Nenalezeny žádné položky"; },
formatInputTooShort: function (input, min) { formatInputTooShort: function (input, min) {
var n = min - input.length; var n = min - input.length;

View File

@ -6,7 +6,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['da'] = {
formatNoMatches: function () { return "Ingen resultater fundet"; }, formatNoMatches: function () { return "Ingen resultater fundet"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Angiv venligst " + n + " tegn mere"; }, formatInputTooShort: function (input, min) { var n = min - input.length; return "Angiv venligst " + n + " tegn mere"; },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Angiv venligst " + n + " tegn mindre"; }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Angiv venligst " + n + " tegn mindre"; },

View File

@ -4,7 +4,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['de'] = {
formatNoMatches: function () { return "Keine Übereinstimmungen gefunden"; }, formatNoMatches: function () { return "Keine Übereinstimmungen gefunden"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Bitte " + n + " Zeichen mehr eingeben"; }, formatInputTooShort: function (input, min) { var n = min - input.length; return "Bitte " + n + " Zeichen mehr eingeben"; },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Bitte " + n + " Zeichen weniger eingeben"; }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Bitte " + n + " Zeichen weniger eingeben"; },

View File

@ -6,7 +6,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['el'] = {
formatNoMatches: function () { return "Δεν βρέθηκαν αποτελέσματα"; }, formatNoMatches: function () { return "Δεν βρέθηκαν αποτελέσματα"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Παρακαλούμε εισάγετε " + n + " περισσότερο" + (n > 1 ? "υς" : "") + " χαρακτήρ" + (n > 1 ? "ες" : "α"); }, formatInputTooShort: function (input, min) { var n = min - input.length; return "Παρακαλούμε εισάγετε " + n + " περισσότερο" + (n > 1 ? "υς" : "") + " χαρακτήρ" + (n > 1 ? "ες" : "α"); },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Παρακαλούμε διαγράψτε " + n + " χαρακτήρ" + (n > 1 ? "ες" : "α"); }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Παρακαλούμε διαγράψτε " + n + " χαρακτήρ" + (n > 1 ? "ες" : "α"); },

View File

@ -6,7 +6,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['en'] = {
formatMatches: function (matches) { if (matches === 1) { return "One result is available, press enter to select it."; } return matches + " results are available, use up and down arrow keys to navigate."; }, formatMatches: function (matches) { if (matches === 1) { return "One result is available, press enter to select it."; } return matches + " results are available, use up and down arrow keys to navigate."; },
formatNoMatches: function () { return "No matches found"; }, formatNoMatches: function () { return "No matches found"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Please enter " + n + " or more character" + (n == 1 ? "" : "s"); }, formatInputTooShort: function (input, min) { var n = min - input.length; return "Please enter " + n + " or more character" + (n == 1 ? "" : "s"); },

View File

@ -4,7 +4,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['es'] = {
formatNoMatches: function () { return "No se encontraron resultados"; }, formatNoMatches: function () { return "No se encontraron resultados"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Por favor, introduzca " + n + " car" + (n == 1? "ácter" : "acteres"); }, formatInputTooShort: function (input, min) { var n = min - input.length; return "Por favor, introduzca " + n + " car" + (n == 1? "ácter" : "acteres"); },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Por favor, elimine " + n + " car" + (n == 1? "ácter" : "acteres"); }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Por favor, elimine " + n + " car" + (n == 1? "ácter" : "acteres"); },

View File

@ -6,7 +6,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['et'] = {
formatNoMatches: function () { return "Tulemused puuduvad"; }, formatNoMatches: function () { return "Tulemused puuduvad"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Sisesta " + n + " täht" + (n == 1 ? "" : "e") + " rohkem"; }, formatInputTooShort: function (input, min) { var n = min - input.length; return "Sisesta " + n + " täht" + (n == 1 ? "" : "e") + " rohkem"; },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Sisesta " + n + " täht" + (n == 1? "" : "e") + " vähem"; }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Sisesta " + n + " täht" + (n == 1? "" : "e") + " vähem"; },

View File

@ -6,7 +6,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['eu'] = {
formatNoMatches: function () { formatNoMatches: function () {
return "Ez da bat datorrenik aurkitu"; return "Ez da bat datorrenik aurkitu";
}, },

View File

@ -7,7 +7,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['fa'] = {
formatMatches: function (matches) { return matches + " نتیجه موجود است، کلیدهای جهت بالا و پایین را برای گشتن استفاده کنید."; }, formatMatches: function (matches) { return matches + " نتیجه موجود است، کلیدهای جهت بالا و پایین را برای گشتن استفاده کنید."; },
formatNoMatches: function () { return "نتیجه‌ای یافت نشد."; }, formatNoMatches: function () { return "نتیجه‌ای یافت نشد."; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "لطفاً " + n + " نویسه بیشتر وارد نمایید"; }, formatInputTooShort: function (input, min) { var n = min - input.length; return "لطفاً " + n + " نویسه بیشتر وارد نمایید"; },

View File

@ -3,7 +3,7 @@
*/ */
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['fi'] = {
formatNoMatches: function () { formatNoMatches: function () {
return "Ei tuloksia"; return "Ei tuloksia";
}, },

View File

@ -4,7 +4,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['fr'] = {
formatMatches: function (matches) { return matches + " résultats sont disponibles, utilisez les flèches haut et bas pour naviguer."; }, formatMatches: function (matches) { return matches + " résultats sont disponibles, utilisez les flèches haut et bas pour naviguer."; },
formatNoMatches: function () { return "Aucun résultat trouvé"; }, formatNoMatches: function () { return "Aucun résultat trouvé"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Saisissez " + n + " caractère" + (n == 1? "" : "s") + " supplémentaire" + (n == 1? "" : "s") ; }, formatInputTooShort: function (input, min) { var n = min - input.length; return "Saisissez " + n + " caractère" + (n == 1? "" : "s") + " supplémentaire" + (n == 1? "" : "s") ; },

View File

@ -6,7 +6,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['gl'] = {
formatNoMatches: function () { formatNoMatches: function () {
return "Non se atoparon resultados"; return "Non se atoparon resultados";
}, },

View File

@ -6,7 +6,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['he'] = {
formatNoMatches: function () { return "לא נמצאו התאמות"; }, formatNoMatches: function () { return "לא נמצאו התאמות"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "נא להזין עוד " + n + " תווים נוספים"; }, formatInputTooShort: function (input, min) { var n = min - input.length; return "נא להזין עוד " + n + " תווים נוספים"; },
formatInputTooLong: function (input, max) { var n = input.length - max; return "נא להזין פחות " + n + " תווים"; }, formatInputTooLong: function (input, max) { var n = input.length - max; return "נא להזין פחות " + n + " תווים"; },

View File

@ -7,7 +7,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['hr'] = {
formatNoMatches: function () { return "Nema rezultata"; }, formatNoMatches: function () { return "Nema rezultata"; },
formatInputTooShort: function (input, min) { return "Unesite još" + character(min - input.length); }, formatInputTooShort: function (input, min) { return "Unesite još" + character(min - input.length); },
formatInputTooLong: function (input, max) { return "Unesite" + character(input.length - max) + " manje"; }, formatInputTooLong: function (input, max) { return "Unesite" + character(input.length - max) + " manje"; },

View File

@ -4,7 +4,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['hu'] = {
formatNoMatches: function () { return "Nincs találat."; }, formatNoMatches: function () { return "Nincs találat."; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Túl rövid. Még " + n + " karakter hiányzik."; }, formatInputTooShort: function (input, min) { var n = min - input.length; return "Túl rövid. Még " + n + " karakter hiányzik."; },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Túl hosszú. " + n + " karakterrel több, mint kellene."; }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Túl hosszú. " + n + " karakterrel több, mint kellene."; },

View File

@ -6,7 +6,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['id'] = {
formatNoMatches: function () { return "Tidak ada data yang sesuai"; }, formatNoMatches: function () { return "Tidak ada data yang sesuai"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Masukkan " + n + " huruf lagi" + (n == 1 ? "" : "s"); }, formatInputTooShort: function (input, min) { var n = min - input.length; return "Masukkan " + n + " huruf lagi" + (n == 1 ? "" : "s"); },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Hapus " + n + " huruf" + (n == 1 ? "" : "s"); }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Hapus " + n + " huruf" + (n == 1 ? "" : "s"); },

View File

@ -4,7 +4,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['is'] = {
formatNoMatches: function () { return "Ekkert fannst"; }, formatNoMatches: function () { return "Ekkert fannst"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Vinsamlegast skrifið " + n + " staf" + (n > 1 ? "i" : "") + " í viðbót"; }, formatInputTooShort: function (input, min) { var n = min - input.length; return "Vinsamlegast skrifið " + n + " staf" + (n > 1 ? "i" : "") + " í viðbót"; },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Vinsamlegast styttið texta um " + n + " staf" + (n > 1 ? "i" : ""); }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Vinsamlegast styttið texta um " + n + " staf" + (n > 1 ? "i" : ""); },

View File

@ -4,7 +4,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['it'] = {
formatNoMatches: function () { return "Nessuna corrispondenza trovata"; }, formatNoMatches: function () { return "Nessuna corrispondenza trovata"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Inserisci ancora " + n + " caratter" + (n == 1? "e" : "i"); }, formatInputTooShort: function (input, min) { var n = min - input.length; return "Inserisci ancora " + n + " caratter" + (n == 1? "e" : "i"); },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Inserisci " + n + " caratter" + (n == 1? "e" : "i") + " in meno"; }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Inserisci " + n + " caratter" + (n == 1? "e" : "i") + " in meno"; },

View File

@ -4,7 +4,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['ja'] = {
formatNoMatches: function () { return "該当なし"; }, formatNoMatches: function () { return "該当なし"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "後" + n + "文字入れてください"; }, formatInputTooShort: function (input, min) { var n = min - input.length; return "後" + n + "文字入れてください"; },
formatInputTooLong: function (input, max) { var n = input.length - max; return "検索文字列が" + n + "文字長すぎます"; }, formatInputTooLong: function (input, max) { var n = input.length - max; return "検索文字列が" + n + "文字長すぎます"; },

View File

@ -6,7 +6,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['ka'] = {
formatNoMatches: function () { return "ვერ მოიძებნა"; }, formatNoMatches: function () { return "ვერ მოიძებნა"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "გთხოვთ შეიყვანოთ კიდევ " + n + " სიმბოლო"; }, formatInputTooShort: function (input, min) { var n = min - input.length; return "გთხოვთ შეიყვანოთ კიდევ " + n + " სიმბოლო"; },
formatInputTooLong: function (input, max) { var n = input.length - max; return "გთხოვთ წაშალოთ " + n + " სიმბოლო"; }, formatInputTooLong: function (input, max) { var n = input.length - max; return "გთხოვთ წაშალოთ " + n + " სიმბოლო"; },

View File

@ -6,7 +6,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['ko'] = {
formatNoMatches: function () { return "결과 없음"; }, formatNoMatches: function () { return "결과 없음"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "너무 짧습니다. "+n+"글자 더 입력해주세요."; }, formatInputTooShort: function (input, min) { var n = min - input.length; return "너무 짧습니다. "+n+"글자 더 입력해주세요."; },
formatInputTooLong: function (input, max) { var n = input.length - max; return "너무 깁니다. "+n+"글자 지워주세요."; }, formatInputTooLong: function (input, max) { var n = input.length - max; return "너무 깁니다. "+n+"글자 지워주세요."; },

View File

@ -7,7 +7,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['lt'] = {
formatNoMatches: function () { return "Atitikmenų nerasta"; }, formatNoMatches: function () { return "Atitikmenų nerasta"; },
formatInputTooShort: function (input, min) { return "Įrašykite dar" + character(min - input.length); }, formatInputTooShort: function (input, min) { return "Įrašykite dar" + character(min - input.length); },
formatInputTooLong: function (input, max) { return "Pašalinkite" + character(input.length - max); }, formatInputTooLong: function (input, max) { return "Pašalinkite" + character(input.length - max); },

View File

@ -6,7 +6,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['lv'] = {
formatNoMatches: function () { return "Sakritību nav"; }, formatNoMatches: function () { return "Sakritību nav"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Lūdzu ievadiet vēl " + n + " simbol" + (n == 11 ? "us" : n%10 == 1 ? "u" : "us"); }, formatInputTooShort: function (input, min) { var n = min - input.length; return "Lūdzu ievadiet vēl " + n + " simbol" + (n == 11 ? "us" : n%10 == 1 ? "u" : "us"); },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Lūdzu ievadiet par " + n + " simbol" + (n == 11 ? "iem" : n%10 == 1 ? "u" : "iem") + " mazāk"; }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Lūdzu ievadiet par " + n + " simbol" + (n == 11 ? "iem" : n%10 == 1 ? "u" : "iem") + " mazāk"; },

View File

@ -6,7 +6,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['mk'] = {
formatNoMatches: function () { return "Нема пронајдено совпаѓања"; }, formatNoMatches: function () { return "Нема пронајдено совпаѓања"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Ве молиме внесете уште " + n + " карактер" + (n == 1 ? "" : "и"); }, formatInputTooShort: function (input, min) { var n = min - input.length; return "Ве молиме внесете уште " + n + " карактер" + (n == 1 ? "" : "и"); },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Ве молиме внесете " + n + " помалку карактер" + (n == 1? "" : "и"); }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Ве молиме внесете " + n + " помалку карактер" + (n == 1? "" : "и"); },

View File

@ -6,7 +6,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['ms'] = {
formatNoMatches: function () { return "Tiada padanan yang ditemui"; }, formatNoMatches: function () { return "Tiada padanan yang ditemui"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Sila masukkan " + n + " aksara lagi"; }, formatInputTooShort: function (input, min) { var n = min - input.length; return "Sila masukkan " + n + " aksara lagi"; },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Sila hapuskan " + n + " aksara"; }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Sila hapuskan " + n + " aksara"; },

View File

@ -4,7 +4,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['nl'] = {
formatNoMatches: function () { return "Geen resultaten gevonden"; }, formatNoMatches: function () { return "Geen resultaten gevonden"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Vul " + n + " karakter" + (n == 1? "" : "s") + " meer in"; }, formatInputTooShort: function (input, min) { var n = min - input.length; return "Vul " + n + " karakter" + (n == 1? "" : "s") + " meer in"; },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Vul " + n + " karakter" + (n == 1? "" : "s") + " minder in"; }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Vul " + n + " karakter" + (n == 1? "" : "s") + " minder in"; },

View File

@ -6,7 +6,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['no'] = {
formatNoMatches: function () { return "Ingen treff"; }, formatNoMatches: function () { return "Ingen treff"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Vennligst skriv inn " + n + (n>1 ? " flere tegn" : " tegn til"); }, formatInputTooShort: function (input, min) { var n = min - input.length; return "Vennligst skriv inn " + n + (n>1 ? " flere tegn" : " tegn til"); },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Vennligst fjern " + n + " tegn"; }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Vennligst fjern " + n + " tegn"; },

View File

@ -8,7 +8,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['pl'] = {
formatNoMatches: function () { return "Brak wyników"; }, formatNoMatches: function () { return "Brak wyników"; },
formatInputTooShort: function (input, min) { return "Wpisz co najmniej" + character(min - input.length, "znak", "i"); }, formatInputTooShort: function (input, min) { return "Wpisz co najmniej" + character(min - input.length, "znak", "i"); },
formatInputTooLong: function (input, max) { return "Wpisana fraza jest za długa o" + character(input.length - max, "znak", "i"); }, formatInputTooLong: function (input, max) { return "Wpisana fraza jest za długa o" + character(input.length - max, "znak", "i"); },

View File

@ -4,7 +4,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['pt-BR'] = {
formatNoMatches: function () { return "Nenhum resultado encontrado"; }, formatNoMatches: function () { return "Nenhum resultado encontrado"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Digite mais " + n + " caracter" + (n == 1? "" : "es"); }, formatInputTooShort: function (input, min) { var n = min - input.length; return "Digite mais " + n + " caracter" + (n == 1? "" : "es"); },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Apague " + n + " caracter" + (n == 1? "" : "es"); }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Apague " + n + " caracter" + (n == 1? "" : "es"); },

View File

@ -4,7 +4,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['pt-PT'] = {
formatNoMatches: function () { return "Nenhum resultado encontrado"; }, formatNoMatches: function () { return "Nenhum resultado encontrado"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Introduza " + n + " car" + (n == 1 ? "ácter" : "acteres"); }, formatInputTooShort: function (input, min) { var n = min - input.length; return "Introduza " + n + " car" + (n == 1 ? "ácter" : "acteres"); },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Apague " + n + " car" + (n == 1 ? "ácter" : "acteres"); }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Apague " + n + " car" + (n == 1 ? "ácter" : "acteres"); },

View File

@ -4,7 +4,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['ro'] = {
formatNoMatches: function () { return "Nu a fost găsit nimic"; }, formatNoMatches: function () { return "Nu a fost găsit nimic"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Vă rugăm să introduceți incă " + n + " caracter" + (n == 1 ? "" : "e"); }, formatInputTooShort: function (input, min) { var n = min - input.length; return "Vă rugăm să introduceți incă " + n + " caracter" + (n == 1 ? "" : "e"); },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Vă rugăm să introduceți mai puțin de " + n + " caracter" + (n == 1? "" : "e"); }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Vă rugăm să introduceți mai puțin de " + n + " caracter" + (n == 1? "" : "e"); },

View File

@ -6,7 +6,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['rs'] = {
formatNoMatches: function () { return "Ništa nije pronađeno"; }, formatNoMatches: function () { return "Ništa nije pronađeno"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Ukucajte bar još " + n + " simbol" + (n % 10 == 1 && n % 100 != 11 ? "" : "a"); }, formatInputTooShort: function (input, min) { var n = min - input.length; return "Ukucajte bar još " + n + " simbol" + (n % 10 == 1 && n % 100 != 11 ? "" : "a"); },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Obrišite " + n + " simbol" + (n % 10 == 1 && n % 100 != 11 ? "" : "a"); }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Obrišite " + n + " simbol" + (n % 10 == 1 && n % 100 != 11 ? "" : "a"); },

View File

@ -6,7 +6,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['ru'] = {
formatNoMatches: function () { return "Совпадений не найдено"; }, formatNoMatches: function () { return "Совпадений не найдено"; },
formatInputTooShort: function (input, min) { return "Пожалуйста, введите еще хотя бы" + character(min - input.length); }, formatInputTooShort: function (input, min) { return "Пожалуйста, введите еще хотя бы" + character(min - input.length); },
formatInputTooLong: function (input, max) { return "Пожалуйста, введите на" + character(input.length - max) + " меньше"; }, formatInputTooLong: function (input, max) { return "Пожалуйста, введите на" + character(input.length - max) + " меньше"; },

View File

@ -11,7 +11,7 @@
3: function() { return "tri"; }, 3: function() { return "tri"; },
4: function() { return "štyri"; } 4: function() { return "štyri"; }
} }
$.extend($.fn.select2.defaults, { $.fn.select2.locales['sk'] = {
formatNoMatches: function () { return "Nenašli sa žiadne položky"; }, formatNoMatches: function () { return "Nenašli sa žiadne položky"; },
formatInputTooShort: function (input, min) { formatInputTooShort: function (input, min) {
var n = min - input.length; var n = min - input.length;

View File

@ -6,7 +6,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['sv'] = {
formatNoMatches: function () { return "Inga träffar"; }, formatNoMatches: function () { return "Inga träffar"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Var god skriv in " + n + (n>1 ? " till tecken" : " tecken till"); }, formatInputTooShort: function (input, min) { var n = min - input.length; return "Var god skriv in " + n + (n>1 ? " till tecken" : " tecken till"); },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Var god sudda ut " + n + " tecken"; }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Var god sudda ut " + n + " tecken"; },

View File

@ -6,7 +6,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['th'] = {
formatNoMatches: function () { return "ไม่พบข้อมูล"; }, formatNoMatches: function () { return "ไม่พบข้อมูล"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "โปรดพิมพ์เพิ่มอีก " + n + " ตัวอักษร"; }, formatInputTooShort: function (input, min) { var n = min - input.length; return "โปรดพิมพ์เพิ่มอีก " + n + " ตัวอักษร"; },
formatInputTooLong: function (input, max) { var n = input.length - max; return "โปรดลบออก " + n + " ตัวอักษร"; }, formatInputTooLong: function (input, max) { var n = input.length - max; return "โปรดลบออก " + n + " ตัวอักษร"; },

View File

@ -6,7 +6,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['tr'] = {
formatNoMatches: function () { return "Sonuç bulunamadı"; }, formatNoMatches: function () { return "Sonuç bulunamadı"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "En az " + n + " karakter daha girmelisiniz"; }, formatInputTooShort: function (input, min) { var n = min - input.length; return "En az " + n + " karakter daha girmelisiniz"; },
formatInputTooLong: function (input, max) { var n = input.length - max; return n + " karakter azaltmalısınız"; }, formatInputTooLong: function (input, max) { var n = input.length - max; return n + " karakter azaltmalısınız"; },

View File

@ -7,7 +7,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['uk'] = {
formatMatches: function (matches) { return character(matches, "результат") + " знайдено, використовуйте клавіші зі стрілками вверх та вниз для навігації."; }, formatMatches: function (matches) { return character(matches, "результат") + " знайдено, використовуйте клавіші зі стрілками вверх та вниз для навігації."; },
formatNoMatches: function () { return "Нічого не знайдено"; }, formatNoMatches: function () { return "Нічого не знайдено"; },
formatInputTooShort: function (input, min) { return "Введіть буль ласка ще " + character(min - input.length, "символ"); }, formatInputTooShort: function (input, min) { return "Введіть буль ласка ще " + character(min - input.length, "символ"); },

View File

@ -6,7 +6,7 @@
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['vi'] = {
formatNoMatches: function () { return "Không tìm thấy kết quả"; }, formatNoMatches: function () { return "Không tìm thấy kết quả"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Vui lòng nhập nhiều hơn " + n + " ký tự" + (n == 1 ? "" : "s"); }, formatInputTooShort: function (input, min) { var n = min - input.length; return "Vui lòng nhập nhiều hơn " + n + " ký tự" + (n == 1 ? "" : "s"); },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Vui lòng nhập ít hơn " + n + " ký tự" + (n == 1? "" : "s"); }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Vui lòng nhập ít hơn " + n + " ký tự" + (n == 1? "" : "s"); },

View File

@ -3,7 +3,7 @@
*/ */
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['zh-CN'] = {
formatNoMatches: function () { return "没有找到匹配项"; }, formatNoMatches: function () { return "没有找到匹配项"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "请再输入" + n + "个字符";}, formatInputTooShort: function (input, min) { var n = min - input.length; return "请再输入" + n + "个字符";},
formatInputTooLong: function (input, max) { var n = input.length - max; return "请删掉" + n + "个字符";}, formatInputTooLong: function (input, max) { var n = input.length - max; return "请删掉" + n + "个字符";},

View File

@ -3,7 +3,7 @@
*/ */
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['zh-TW'] = {
formatNoMatches: function () { return "沒有找到相符的項目"; }, formatNoMatches: function () { return "沒有找到相符的項目"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "請再輸入" + n + "個字元";}, formatInputTooShort: function (input, min) { var n = min - input.length; return "請再輸入" + n + "個字元";},
formatInputTooLong: function (input, max) { var n = input.length - max; return "請刪掉" + n + "個字元";}, formatInputTooLong: function (input, max) { var n = input.length - max; return "請刪掉" + n + "個字元";},