From 6b92b1c211d9e2769d5aafebd097fa99fe4b58c8 Mon Sep 17 00:00:00 2001 From: Jonas Pyfferoen Date: Thu, 15 May 2014 12:55:44 +0200 Subject: [PATCH] Immediately apply language when including Signed-off-by: Kevin Brown --- select2_locale_ar.js | 5 ++++- select2_locale_bg.js | 5 ++++- select2_locale_ca.js | 5 ++++- select2_locale_cs.js | 5 ++++- select2_locale_da.js | 5 ++++- select2_locale_de.js | 7 +++++-- select2_locale_el.js | 5 ++++- select2_locale_en.js.template | 5 ++++- select2_locale_es.js | 5 ++++- select2_locale_et.js | 5 ++++- select2_locale_eu.js | 5 ++++- select2_locale_fa.js | 5 ++++- select2_locale_fi.js | 5 ++++- select2_locale_fr.js | 5 ++++- select2_locale_gl.js | 5 ++++- select2_locale_he.js | 5 ++++- select2_locale_hr.js | 5 ++++- select2_locale_hu.js | 5 ++++- select2_locale_id.js | 5 ++++- select2_locale_is.js | 5 ++++- select2_locale_it.js | 5 ++++- select2_locale_ja.js | 5 ++++- select2_locale_ka.js | 5 ++++- select2_locale_ko.js | 5 ++++- select2_locale_lt.js | 5 ++++- select2_locale_lv.js | 5 ++++- select2_locale_mk.js | 5 ++++- select2_locale_ms.js | 5 ++++- select2_locale_nl.js | 5 ++++- select2_locale_no.js | 5 ++++- select2_locale_pl.js | 5 ++++- select2_locale_pt-BR.js | 5 ++++- select2_locale_pt-PT.js | 5 ++++- select2_locale_ro.js | 5 ++++- select2_locale_rs.js | 5 ++++- select2_locale_ru.js | 5 ++++- select2_locale_sk.js | 5 ++++- select2_locale_sv.js | 5 ++++- select2_locale_th.js | 5 ++++- select2_locale_tr.js | 5 ++++- select2_locale_uk.js | 6 +++++- select2_locale_vi.js | 5 ++++- select2_locale_zh-CN.js | 5 ++++- select2_locale_zh-TW.js | 5 ++++- 44 files changed, 178 insertions(+), 45 deletions(-) diff --git a/select2_locale_ar.js b/select2_locale_ar.js index bdc19c95..119f89b1 100644 --- a/select2_locale_ar.js +++ b/select2_locale_ar.js @@ -13,5 +13,8 @@ formatSelectionTooBig: function (limit) { if (n == 1){ return "يمكنك أن تختار إختيار واحد فقط"; } return n == 2 ? "يمكنك أن تختار إختيارين فقط" : "يمكنك أن تختار " + n + " إختيارات فقط"; }, formatLoadMore: function (pageNumber) { return "تحميل المزيد من النتائج…"; }, formatSearching: function () { return "البحث…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['ar']); + ); })(jQuery); diff --git a/select2_locale_bg.js b/select2_locale_bg.js index 360ed07b..e309aec6 100644 --- a/select2_locale_bg.js +++ b/select2_locale_bg.js @@ -14,5 +14,8 @@ formatSelectionTooBig: function (limit) { return "Можете да направите до " + limit + (limit > 1 ? " избора" : " избор"); }, formatLoadMore: function (pageNumber) { return "Зареждат се още…"; }, formatSearching: function () { return "Търсене…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['bg']); + ); })(jQuery); diff --git a/select2_locale_ca.js b/select2_locale_ca.js index 3a288fdc..a6c3a377 100644 --- a/select2_locale_ca.js +++ b/select2_locale_ca.js @@ -13,5 +13,8 @@ formatSelectionTooBig: function (limit) { return "Només podeu seleccionar " + limit + " element" + (limit == 1 ? "" : "s"); }, formatLoadMore: function (pageNumber) { return "S'estan carregant més resultats…"; }, formatSearching: function () { return "S'està cercant…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['ca']); + ); })(jQuery); diff --git a/select2_locale_cs.js b/select2_locale_cs.js index d36e45da..5fe984f9 100644 --- a/select2_locale_cs.js +++ b/select2_locale_cs.js @@ -45,5 +45,8 @@ }, formatLoadMore: function (pageNumber) { return "Načítají se další výsledky…"; }, formatSearching: function () { return "Vyhledávání…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['cs']); + ); })(jQuery); diff --git a/select2_locale_da.js b/select2_locale_da.js index d67c445f..df95bd32 100644 --- a/select2_locale_da.js +++ b/select2_locale_da.js @@ -13,5 +13,8 @@ formatSelectionTooBig: function (limit) { return "Du kan kun vælge " + limit + " emne" + (limit === 1 ? "" : "r"); }, formatLoadMore: function (pageNumber) { return "Indlæser flere resultater…"; }, formatSearching: function () { return "Søger…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['fi']); + ); })(jQuery); diff --git a/select2_locale_de.js b/select2_locale_de.js index 5e41f36b..67fa42bd 100644 --- a/select2_locale_de.js +++ b/select2_locale_de.js @@ -12,5 +12,8 @@ formatLoadMore: function (pageNumber) { return "Lade mehr Ergebnisse…"; }, formatSearching: function () { return "Suche…"; }, formatMatches: function (matches) { return matches + " Ergebnis " + (matches > 1 ? "se" : "") + " verfügbar, zum Navigieren die Hoch-/Runter-Pfeiltasten verwenden."; } - }); -})(jQuery); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['de']); + ); +})(jQuery); \ No newline at end of file diff --git a/select2_locale_el.js b/select2_locale_el.js index a5d8fed1..f135d92e 100644 --- a/select2_locale_el.js +++ b/select2_locale_el.js @@ -13,5 +13,8 @@ formatSelectionTooBig: function (limit) { return "Μπορείτε να επιλέξετε μόνο " + limit + " αντικείμεν" + (limit > 1 ? "α" : "ο"); }, formatLoadMore: function (pageNumber) { return "Φόρτωση περισσότερων…"; }, formatSearching: function () { return "Αναζήτηση…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['el']); + ); })(jQuery); \ No newline at end of file diff --git a/select2_locale_en.js.template b/select2_locale_en.js.template index adf3d19f..88e209c3 100644 --- a/select2_locale_en.js.template +++ b/select2_locale_en.js.template @@ -14,5 +14,8 @@ 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']); + ); })(jQuery); diff --git a/select2_locale_es.js b/select2_locale_es.js index 15d515d3..afaaaa81 100644 --- a/select2_locale_es.js +++ b/select2_locale_es.js @@ -11,5 +11,8 @@ formatSelectionTooBig: function (limit) { return "Sólo puede seleccionar " + limit + " elemento" + (limit == 1 ? "" : "s"); }, formatLoadMore: function (pageNumber) { return "Cargando más resultados…"; }, formatSearching: function () { return "Buscando…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['es']); + ); })(jQuery); diff --git a/select2_locale_et.js b/select2_locale_et.js index 4a9bc36c..5ff9682e 100644 --- a/select2_locale_et.js +++ b/select2_locale_et.js @@ -13,5 +13,8 @@ formatSelectionTooBig: function (limit) { return "Saad vaid " + limit + " tulemus" + (limit == 1 ? "e" : "t") + " valida"; }, formatLoadMore: function (pageNumber) { return "Laen tulemusi.."; }, formatSearching: function () { return "Otsin.."; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['et']); + ); })(jQuery); diff --git a/select2_locale_eu.js b/select2_locale_eu.js index 4e8873fa..1825aca1 100644 --- a/select2_locale_eu.js +++ b/select2_locale_eu.js @@ -39,5 +39,8 @@ formatSearching: function () { return "Bilatzen…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['eu']); + ); })(jQuery); diff --git a/select2_locale_fa.js b/select2_locale_fa.js index 6ffbde32..b4570eb8 100644 --- a/select2_locale_fa.js +++ b/select2_locale_fa.js @@ -15,5 +15,8 @@ formatSelectionTooBig: function (limit) { return "شما فقط می‌توانید " + limit + " مورد را انتخاب کنید"; }, formatLoadMore: function (pageNumber) { return "در حال بارگیری موارد بیشتر…"; }, formatSearching: function () { return "در حال جستجو…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['fa']); + ); })(jQuery); diff --git a/select2_locale_fi.js b/select2_locale_fi.js index e67407cc..f51d3764 100644 --- a/select2_locale_fi.js +++ b/select2_locale_fi.js @@ -24,5 +24,8 @@ formatSearching: function () { return "Etsitään…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['fi']); + ); })(jQuery); diff --git a/select2_locale_fr.js b/select2_locale_fr.js index a9711d47..94ba2551 100644 --- a/select2_locale_fr.js +++ b/select2_locale_fr.js @@ -12,5 +12,8 @@ formatSelectionTooBig: function (limit) { return "Vous pouvez seulement sélectionner " + limit + " élément" + (limit == 1 ? "" : "s"); }, formatLoadMore: function (pageNumber) { return "Chargement de résultats supplémentaires…"; }, formatSearching: function () { return "Recherche en cours…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['fr']); + ); })(jQuery); diff --git a/select2_locale_gl.js b/select2_locale_gl.js index 252fb112..dfc185e8 100644 --- a/select2_locale_gl.js +++ b/select2_locale_gl.js @@ -39,5 +39,8 @@ formatSearching: function () { return "Buscando…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['gl']); + ); })(jQuery); diff --git a/select2_locale_he.js b/select2_locale_he.js index e34ab0b4..da99fc42 100644 --- a/select2_locale_he.js +++ b/select2_locale_he.js @@ -13,5 +13,8 @@ formatSelectionTooBig: function (limit) { return "ניתן לבחור " + limit + " פריטים"; }, formatLoadMore: function (pageNumber) { return "טוען תוצאות נוספות…"; }, formatSearching: function () { return "מחפש…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['he']); + ); })(jQuery); diff --git a/select2_locale_hr.js b/select2_locale_hr.js index 1bc19f63..5f79b156 100644 --- a/select2_locale_hr.js +++ b/select2_locale_hr.js @@ -14,7 +14,10 @@ formatSelectionTooBig: function (limit) { return "Maksimalan broj odabranih stavki je " + limit; }, formatLoadMore: function (pageNumber) { return "Učitavanje rezultata…"; }, formatSearching: function () { return "Pretraga…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['hr']); + ); function character (n) { return " " + n + " znak" + (n%10 < 5 && n%10 > 0 && (n%100 < 5 || n%100 > 19) ? n%10 > 1 ? "a" : "" : "ova"); diff --git a/select2_locale_hu.js b/select2_locale_hu.js index 69faa999..7f502764 100644 --- a/select2_locale_hu.js +++ b/select2_locale_hu.js @@ -11,5 +11,8 @@ formatSelectionTooBig: function (limit) { return "Csak " + limit + " elemet lehet kiválasztani."; }, formatLoadMore: function (pageNumber) { return "Töltés…"; }, formatSearching: function () { return "Keresés…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['hu']); + ); })(jQuery); diff --git a/select2_locale_id.js b/select2_locale_id.js index 243f8cf3..62aa6820 100644 --- a/select2_locale_id.js +++ b/select2_locale_id.js @@ -13,5 +13,8 @@ formatSelectionTooBig: function (limit) { return "Anda hanya dapat memilih " + limit + " pilihan" + (limit == 1 ? "" : "s"); }, formatLoadMore: function (pageNumber) { return "Mengambil data…"; }, formatSearching: function () { return "Mencari…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['id']); + ); })(jQuery); diff --git a/select2_locale_is.js b/select2_locale_is.js index 79778d08..bf9a68db 100644 --- a/select2_locale_is.js +++ b/select2_locale_is.js @@ -11,5 +11,8 @@ formatSelectionTooBig: function (limit) { return "Þú getur aðeins valið " + limit + " atriði"; }, formatLoadMore: function (pageNumber) { return "Sæki fleiri niðurstöður…"; }, formatSearching: function () { return "Leita…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['is']); + ); })(jQuery); diff --git a/select2_locale_it.js b/select2_locale_it.js index 5171c162..d8f9c1f9 100644 --- a/select2_locale_it.js +++ b/select2_locale_it.js @@ -11,5 +11,8 @@ formatSelectionTooBig: function (limit) { return "Puoi selezionare solo " + limit + " element" + (limit == 1 ? "o" : "i"); }, formatLoadMore: function (pageNumber) { return "Caricamento in corso…"; }, formatSearching: function () { return "Ricerca…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['it']); + ); })(jQuery); \ No newline at end of file diff --git a/select2_locale_ja.js b/select2_locale_ja.js index ddc7abf0..517e2551 100644 --- a/select2_locale_ja.js +++ b/select2_locale_ja.js @@ -11,5 +11,8 @@ formatSelectionTooBig: function (limit) { return "最多で" + limit + "項目までしか選択できません"; }, formatLoadMore: function (pageNumber) { return "読込中・・・"; }, formatSearching: function () { return "検索中・・・"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['ja']); + ); })(jQuery); diff --git a/select2_locale_ka.js b/select2_locale_ka.js index f36410ae..d2d3bb6b 100644 --- a/select2_locale_ka.js +++ b/select2_locale_ka.js @@ -13,5 +13,8 @@ formatSelectionTooBig: function (limit) { return "თქვენ შეგიძლიათ მხოლოდ " + limit + " ჩანაწერის მონიშვნა"; }, formatLoadMore: function (pageNumber) { return "შედეგის ჩატვირთვა…"; }, formatSearching: function () { return "ძებნა…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['ka']); + ); })(jQuery); diff --git a/select2_locale_ko.js b/select2_locale_ko.js index 9324c4bd..5f98112d 100644 --- a/select2_locale_ko.js +++ b/select2_locale_ko.js @@ -13,5 +13,8 @@ formatSelectionTooBig: function (limit) { return "최대 "+limit+"개까지만 선택하실 수 있습니다."; }, formatLoadMore: function (pageNumber) { return "불러오는 중…"; }, formatSearching: function () { return "검색 중…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['ko']); + ); })(jQuery); diff --git a/select2_locale_lt.js b/select2_locale_lt.js index f63a7d10..d7d5887b 100644 --- a/select2_locale_lt.js +++ b/select2_locale_lt.js @@ -16,7 +16,10 @@ }, formatLoadMore: function (pageNumber) { return "Kraunama daugiau rezultatų…"; }, formatSearching: function () { return "Ieškoma…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['lt']); + ); function character (n) { return " " + n + " simbol" + ((n%100 > 9 && n%100 < 21) || n%10 == 0 ? "ių" : n%10 > 1 ? "ius" : "į"); diff --git a/select2_locale_lv.js b/select2_locale_lv.js index c684876f..b1afde94 100644 --- a/select2_locale_lv.js +++ b/select2_locale_lv.js @@ -13,5 +13,8 @@ formatSelectionTooBig: function (limit) { return "Jūs varat izvēlēties ne vairāk kā " + limit + " element" + (limit == 11 ? "us" : limit%10 == 1 ? "u" : "us"); }, formatLoadMore: function (pageNumber) { return "Datu ielāde…"; }, formatSearching: function () { return "Meklēšana…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['lv']); + ); })(jQuery); diff --git a/select2_locale_mk.js b/select2_locale_mk.js index 4504f903..005e64fc 100644 --- a/select2_locale_mk.js +++ b/select2_locale_mk.js @@ -13,5 +13,8 @@ formatSelectionTooBig: function (limit) { return "Можете да изберете само " + limit + " ставк" + (limit == 1 ? "а" : "и"); }, formatLoadMore: function (pageNumber) { return "Вчитување резултати…"; }, formatSearching: function () { return "Пребарување…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['mk']); + ); })(jQuery); \ No newline at end of file diff --git a/select2_locale_ms.js b/select2_locale_ms.js index 21b6a05c..f5342888 100644 --- a/select2_locale_ms.js +++ b/select2_locale_ms.js @@ -13,5 +13,8 @@ formatSelectionTooBig: function (limit) { return "Anda hanya boleh memilih " + limit + " pilihan"; }, formatLoadMore: function (pageNumber) { return "Sedang memuatkan keputusan…"; }, formatSearching: function () { return "Mencari…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['ms']); + ); })(jQuery); diff --git a/select2_locale_nl.js b/select2_locale_nl.js index 76045317..64ed8ab0 100644 --- a/select2_locale_nl.js +++ b/select2_locale_nl.js @@ -11,5 +11,8 @@ formatSelectionTooBig: function (limit) { return "Maximaal " + limit + " item" + (limit == 1 ? "" : "s") + " toegestaan"; }, formatLoadMore: function (pageNumber) { return "Meer resultaten laden…"; }, formatSearching: function () { return "Zoeken…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['nl']); + ); })(jQuery); \ No newline at end of file diff --git a/select2_locale_no.js b/select2_locale_no.js index 5e1324d0..270264a4 100644 --- a/select2_locale_no.js +++ b/select2_locale_no.js @@ -13,6 +13,9 @@ formatSelectionTooBig: function (limit) { return "Du kan velge maks " + limit + " elementer"; }, formatLoadMore: function (pageNumber) { return "Laster flere resultater…"; }, formatSearching: function () { return "Søker…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['no']); + ); })(jQuery); diff --git a/select2_locale_pl.js b/select2_locale_pl.js index d647dc9c..eedd0b86 100644 --- a/select2_locale_pl.js +++ b/select2_locale_pl.js @@ -15,7 +15,10 @@ formatSelectionTooBig: function (limit) { return "Możesz zaznaczyć najwyżej" + character(limit, "element", "y"); }, formatLoadMore: function (pageNumber) { return "Ładowanie wyników…"; }, formatSearching: function () { return "Szukanie…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['pl']); + ); function character (n, word, pluralSuffix) { return " " + n + " " + word + (n == 1 ? "" : n%10 < 5 && n%10 > 1 && (n%100 < 5 || n%100 > 20) ? pluralSuffix : "ów"); diff --git a/select2_locale_pt-BR.js b/select2_locale_pt-BR.js index d097054b..2fe1e1ad 100644 --- a/select2_locale_pt-BR.js +++ b/select2_locale_pt-BR.js @@ -11,5 +11,8 @@ formatSelectionTooBig: function (limit) { return "Só é possível selecionar " + limit + " elemento" + (limit == 1 ? "" : "s"); }, formatLoadMore: function (pageNumber) { return "Carregando mais resultados…"; }, formatSearching: function () { return "Buscando…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['pt-BR']); + ); })(jQuery); diff --git a/select2_locale_pt-PT.js b/select2_locale_pt-PT.js index ee18349c..c37dc71b 100644 --- a/select2_locale_pt-PT.js +++ b/select2_locale_pt-PT.js @@ -11,5 +11,8 @@ formatSelectionTooBig: function (limit) { return "Só é possível selecionar " + limit + " elemento" + (limit == 1 ? "" : "s"); }, formatLoadMore: function (pageNumber) { return "A carregar mais resultados…"; }, formatSearching: function () { return "A pesquisar…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['pt-PT']); + ); })(jQuery); diff --git a/select2_locale_ro.js b/select2_locale_ro.js index 6fb26874..8142c87d 100644 --- a/select2_locale_ro.js +++ b/select2_locale_ro.js @@ -11,5 +11,8 @@ formatSelectionTooBig: function (limit) { return "Aveți voie să selectați cel mult " + limit + " element" + (limit == 1 ? "" : "e"); }, formatLoadMore: function (pageNumber) { return "Se încarcă…"; }, formatSearching: function () { return "Căutare…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['ro']); + ); })(jQuery); diff --git a/select2_locale_rs.js b/select2_locale_rs.js index 97569fc9..bc8f7468 100644 --- a/select2_locale_rs.js +++ b/select2_locale_rs.js @@ -13,5 +13,8 @@ formatSelectionTooBig: function (limit) { return "Možete izabrati samo " + limit + " stavk" + (limit % 10 == 1 && limit % 100 != 11 ? "u" : (limit % 10 >= 2 && limit % 10 <= 4 && (limit % 100 < 12 || limit % 100 > 14)? "e" : "i")); }, formatLoadMore: function (pageNumber) { return "Preuzimanje još rezultata…"; }, formatSearching: function () { return "Pretraga…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['rs']); + ); })(jQuery); diff --git a/select2_locale_ru.js b/select2_locale_ru.js index 44a36f04..7db981fe 100644 --- a/select2_locale_ru.js +++ b/select2_locale_ru.js @@ -13,7 +13,10 @@ formatSelectionTooBig: function (limit) { return "Вы можете выбрать не более " + limit + " элемент" + (limit%10 == 1 && limit%100 != 11 ? "а" : "ов"); }, formatLoadMore: function (pageNumber) { return "Загрузка данных…"; }, formatSearching: function () { return "Поиск…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['ru']); + ); function character (n) { return " " + n + " символ" + (n%10 < 5 && n%10 > 0 && (n%100 < 5 || n%100 > 20) ? n%10 > 1 ? "a" : "" : "ов"); diff --git a/select2_locale_sk.js b/select2_locale_sk.js index 707f5f99..9bc2563a 100644 --- a/select2_locale_sk.js +++ b/select2_locale_sk.js @@ -44,5 +44,8 @@ }, formatLoadMore: function (pageNumber) { return "Načítavajú sa ďalšie výsledky…"; }, formatSearching: function () { return "Vyhľadávanie…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['sk']); + ); })(jQuery); diff --git a/select2_locale_sv.js b/select2_locale_sv.js index 26f6f512..a7a24fda 100644 --- a/select2_locale_sv.js +++ b/select2_locale_sv.js @@ -13,5 +13,8 @@ formatSelectionTooBig: function (limit) { return "Du kan max välja " + limit + " element"; }, formatLoadMore: function (pageNumber) { return "Laddar fler resultat…"; }, formatSearching: function () { return "Söker…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['sv']); + ); })(jQuery); diff --git a/select2_locale_th.js b/select2_locale_th.js index 7004d2a5..cecf46db 100644 --- a/select2_locale_th.js +++ b/select2_locale_th.js @@ -13,5 +13,8 @@ formatSelectionTooBig: function (limit) { return "คุณสามารถเลือกได้ไม่เกิน " + limit + " รายการ"; }, formatLoadMore: function (pageNumber) { return "กำลังค้นข้อมูลเพิ่ม…"; }, formatSearching: function () { return "กำลังค้นข้อมูล…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['th']); + ); })(jQuery); diff --git a/select2_locale_tr.js b/select2_locale_tr.js index e9d7a0aa..bc80121f 100644 --- a/select2_locale_tr.js +++ b/select2_locale_tr.js @@ -13,5 +13,8 @@ formatSelectionTooBig: function (limit) { return "Sadece " + limit + " seçim yapabilirsiniz"; }, formatLoadMore: function (pageNumber) { return "Daha fazla…"; }, formatSearching: function () { return "Aranıyor…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['tr']); + ); })(jQuery); diff --git a/select2_locale_uk.js b/select2_locale_uk.js index cd970b35..22ee3419 100644 --- a/select2_locale_uk.js +++ b/select2_locale_uk.js @@ -15,9 +15,13 @@ formatSelectionTooBig: function (limit) { return "Ви можете вибрати лише " + character(limit, "елемент"); }, formatLoadMore: function (pageNumber) { return "Завантаження даних…"; }, formatSearching: function () { return "Пошук…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['uk']); + ); function character (n, word) { return n + " " + word + (n%10 < 5 && n%10 > 0 && (n%100 < 5 || n%100 > 19) ? n%10 > 1 ? "и" : "" : "ів"); } + })(jQuery); diff --git a/select2_locale_vi.js b/select2_locale_vi.js index 1d2dc383..a30af49d 100644 --- a/select2_locale_vi.js +++ b/select2_locale_vi.js @@ -13,6 +13,9 @@ formatSelectionTooBig: function (limit) { return "Chỉ có thể chọn được " + limit + " tùy chọn" + (limit == 1 ? "" : "s"); }, formatLoadMore: function (pageNumber) { return "Đang lấy thêm kết quả…"; }, formatSearching: function () { return "Đang tìm…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['vi']); + ); })(jQuery); diff --git a/select2_locale_zh-CN.js b/select2_locale_zh-CN.js index f20332f3..7f1c2b77 100644 --- a/select2_locale_zh-CN.js +++ b/select2_locale_zh-CN.js @@ -10,5 +10,8 @@ formatSelectionTooBig: function (limit) { return "你只能选择最多" + limit + "项"; }, formatLoadMore: function (pageNumber) { return "加载结果中…"; }, formatSearching: function () { return "搜索中…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['zh-CN']); + ); })(jQuery); diff --git a/select2_locale_zh-TW.js b/select2_locale_zh-TW.js index 10fe24ea..d5d5957d 100644 --- a/select2_locale_zh-TW.js +++ b/select2_locale_zh-TW.js @@ -10,5 +10,8 @@ formatSelectionTooBig: function (limit) { return "你只能選擇最多" + limit + "項"; }, formatLoadMore: function (pageNumber) { return "載入中…"; }, formatSearching: function () { return "搜尋中…"; } - }); + } + + $.extend($.fn.select2.defaults, $.fn.select2.locales['zh-TW']); + ); })(jQuery);