1
0
mirror of synced 2024-11-25 14:26:03 +03:00

Merge remote-tracking branch 'upstream/master'

This commit is contained in:
boyaq 2014-07-11 19:01:16 +08:00
commit feedfe21de
53 changed files with 509 additions and 229 deletions

View File

@ -24,6 +24,10 @@ Browser compatibility
* Firefox 10+ * Firefox 10+
* Safari 3+ * Safari 3+
* Opera 10.6+ * Opera 10.6+
Usage
-----
You can source Select2 directly from a [CDN like JSDliver](http://www.jsdelivr.com/#!select2), [download it from this GitHub repo](https://github.com/ivaynberg/select2/tags), or use one of the integrations below.
Integrations Integrations
------------ ------------
@ -34,14 +38,25 @@ Integrations
* [Django](https://github.com/applegrew/django-select2) * [Django](https://github.com/applegrew/django-select2)
* [Symfony](https://github.com/19Gerhard85/sfSelect2WidgetsPlugin) * [Symfony](https://github.com/19Gerhard85/sfSelect2WidgetsPlugin)
* [Symfony2](https://github.com/avocode/FormExtensions) * [Symfony2](https://github.com/avocode/FormExtensions)
* [Bootstrap](https://github.com/t0m/select2-bootstrap-css) (CSS skin) * [Bootstrap 2](https://github.com/t0m/select2-bootstrap-css) and [Bootstrap 3](https://github.com/t0m/select2-bootstrap-css/tree/bootstrap3) (CSS skins)
* [Yii](https://github.com/tonybolzan/yii-select2) * [Meteor](https://github.com/nate-strauser/meteor-select2) (modern reactive JavaScript framework; + [Bootstrap 3 skin](https://github.com/esperadomedia/meteor-select2-bootstrap3-css/))
* [Meteor](https://jquery-select2.meteor.com)
* [Yii 2.x](http://demos.krajee.com/widgets#select2)
* [Yii 1.x](https://github.com/tonybolzan/yii-select2)
* [AtmosphereJS](https://atmospherejs.com/package/jquery-select2)
### Example Integrations
* [Knockout.js](https://github.com/ivaynberg/select2/wiki/Knockout.js-Integration)
* [Socket.IO](https://github.com/ivaynberg/select2/wiki/Socket.IO-Integration)
* [PHP](https://github.com/ivaynberg/select2/wiki/PHP-Example)
* [.Net MVC] (https://github.com/ivaynberg/select2/wiki/.Net-MVC-Example)
Internationalization (i18n) Internationalization (i18n)
--------------------------- ---------------------------
Select2 supports multiple languages by simply including the right Select2 supports multiple languages by simply including the right language JS
language JS file (`select2_locale_it.js`, `select2_locale_nl.js`, etc.). file (`select2_locale_it.js`, `select2_locale_nl.js`, etc.) after `select2.js`.
Missing a language? Just copy `select2_locale_en.js.template`, translate Missing a language? Just copy `select2_locale_en.js.template`, translate
it, and make a pull request back to Select2 here on GitHub. it, and make a pull request back to Select2 here on GitHub.

View File

@ -1,6 +1,6 @@
{ {
"name": "select2", "name": "select2",
"version": "3.4.6", "version": "3.5.0",
"main": ["select2.js", "select2.css", "select2.png", "select2x2.png", "select2-spinner.gif"], "main": ["select2.js", "select2.css", "select2.png", "select2x2.png", "select2-spinner.gif"],
"dependencies": { "dependencies": {
"jquery": ">= 1.7.1" "jquery": ">= 1.7.1"

View File

@ -2,7 +2,7 @@
"name": "select2", "name": "select2",
"repo": "ivaynberg/select2", "repo": "ivaynberg/select2",
"description": "Select2 is a jQuery based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results.", "description": "Select2 is a jQuery based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results.",
"version": "3.4.6", "version": "3.5.0",
"demo": "http://ivaynberg.github.io/select2/", "demo": "http://ivaynberg.github.io/select2/",
"keywords": [ "keywords": [
"jquery" "jquery"

View File

@ -2,7 +2,7 @@
"name": "name":
"ivaynberg/select2", "ivaynberg/select2",
"description": "Select2 is a jQuery based replacement for select boxes.", "description": "Select2 is a jQuery based replacement for select boxes.",
"version": "3.4.6", "version": "3.5.0",
"type": "component", "type": "component",
"homepage": "http://ivaynberg.github.io/select2/", "homepage": "http://ivaynberg.github.io/select2/",
"license": "Apache-2.0", "license": "Apache-2.0",

View File

@ -5,7 +5,7 @@
"author": "Igor Vaynberg", "author": "Igor Vaynberg",
"repository": {"type": "git", "url": "git://github.com/ivaynberg/select2.git"}, "repository": {"type": "git", "url": "git://github.com/ivaynberg/select2.git"},
"main": "select2.js", "main": "select2.js",
"version": "3.4.6", "version": "3.5.0",
"jspm": { "jspm": {
"main": "select2", "main": "select2",
"files": ["select2.js", "select2.png", "select2.css", "select2-spinner.gif"], "files": ["select2.js", "select2.png", "select2.css", "select2-spinner.gif"],

View File

@ -56,6 +56,10 @@ Version: @@ver@@ Timestamp: @@timestamp@@
background-image: linear-gradient(to top, #eee 0%, #fff 50%); background-image: linear-gradient(to top, #eee 0%, #fff 50%);
} }
html[dir="rtl"] .select2-container .select2-choice {
padding: 0 8px 0 0;
}
.select2-container.select2-drop-above .select2-choice { .select2-container.select2-drop-above .select2-choice {
border-bottom-color: #aaa; border-bottom-color: #aaa;
@ -84,6 +88,11 @@ Version: @@ver@@ Timestamp: @@timestamp@@
width: auto; width: auto;
} }
html[dir="rtl"] .select2-container .select2-choice > .select2-chosen {
margin-left: 26px;
margin-right: 0;
}
.select2-container .select2-choice abbr { .select2-container .select2-choice abbr {
display: none; display: none;
width: 12px; width: 12px;
@ -196,6 +205,15 @@ Version: @@ver@@ Timestamp: @@timestamp@@
background-image: linear-gradient(to top, #ccc 0%, #eee 60%); background-image: linear-gradient(to top, #ccc 0%, #eee 60%);
} }
html[dir="rtl"] .select2-container .select2-choice .select2-arrow {
left: 0;
right: auto;
border-left: none;
border-right: 1px solid #aaa;
border-radius: 4px 0 0 4px;
}
.select2-container .select2-choice .select2-arrow b { .select2-container .select2-choice .select2-arrow b {
display: block; display: block;
width: 100%; width: 100%;
@ -203,6 +221,10 @@ Version: @@ver@@ Timestamp: @@timestamp@@
background: url('select2.png') no-repeat 0 1px; background: url('select2.png') no-repeat 0 1px;
} }
html[dir="rtl"] .select2-container .select2-choice .select2-arrow b {
background-position: 2px 1px;
}
.select2-search { .select2-search {
display: inline-block; display: inline-block;
width: 100%; width: 100%;
@ -241,6 +263,16 @@ Version: @@ver@@ Timestamp: @@timestamp@@
background: url('select2.png') no-repeat 100% -22px, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0; background: url('select2.png') no-repeat 100% -22px, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0;
} }
html[dir="rtl"] .select2-search input {
padding: 4px 5px 4px 20px;
background: #fff url('select2.png') no-repeat -37px -22px;
background: url('select2.png') no-repeat -37px -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, #fff), color-stop(0.99, #eee));
background: url('select2.png') no-repeat -37px -22px, -webkit-linear-gradient(center bottom, #fff 85%, #eee 99%);
background: url('select2.png') no-repeat -37px -22px, -moz-linear-gradient(center bottom, #fff 85%, #eee 99%);
background: url('select2.png') no-repeat -37px -22px, linear-gradient(to bottom, #fff 85%, #eee 99%) 0 0;
}
.select2-drop.select2-drop-above .select2-search input { .select2-drop.select2-drop-above .select2-search input {
margin-top: 4px; margin-top: 4px;
} }
@ -295,10 +327,18 @@ Version: @@ver@@ Timestamp: @@timestamp@@
border-left: none; border-left: none;
filter: none; filter: none;
} }
html[dir="rtl"] .select2-dropdown-open .select2-choice .select2-arrow {
border-right: none;
}
.select2-dropdown-open .select2-choice .select2-arrow b { .select2-dropdown-open .select2-choice .select2-arrow b {
background-position: -18px 1px; background-position: -18px 1px;
} }
html[dir="rtl"] .select2-dropdown-open .select2-choice .select2-arrow b {
background-position: -16px 1px;
}
.select2-hidden-accessible { .select2-hidden-accessible {
border: 0; border: 0;
clip: rect(0 0 0 0); clip: rect(0 0 0 0);
@ -321,6 +361,11 @@ Version: @@ver@@ Timestamp: @@timestamp@@
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
} }
html[dir="rtl"] .select2-results {
padding: 0 4px 0 0;
margin: 4px 0 4px 4px;
}
.select2-results ul.select2-result-sub { .select2-results ul.select2-result-sub {
margin: 0; margin: 0;
padding-left: 0; padding-left: 0;
@ -350,15 +395,13 @@ Version: @@ver@@ Timestamp: @@timestamp@@
user-select: none; user-select: none;
} }
.select2-results-dept-0 .select2-result-label { padding-left: 20px } .select2-results-dept-1 .select2-result-label { padding-left: 20px }
.select2-results-dept-1 .select2-result-label { padding-left: 40px } .select2-results-dept-2 .select2-result-label { padding-left: 40px }
.select2-results-dept-2 .select2-result-label { padding-left: 60px } .select2-results-dept-3 .select2-result-label { padding-left: 60px }
.select2-results-dept-3 .select2-result-label { padding-left: 80px } .select2-results-dept-4 .select2-result-label { padding-left: 80px }
.select2-results-dept-4 .select2-result-label { padding-left: 100px } .select2-results-dept-5 .select2-result-label { padding-left: 100px }
.select2-results-dept-5 .select2-result-label { padding-left: 110px } .select2-results-dept-6 .select2-result-label { padding-left: 110px }
.select2-results-dept-6 .select2-result-label { padding-left: 120px } .select2-results-dept-7 .select2-result-label { padding-left: 120px }
.select2-results .select2-highlighted { .select2-results .select2-highlighted {
background: #3875d7; background: #3875d7;
@ -379,9 +422,9 @@ Version: @@ver@@ Timestamp: @@timestamp@@
color: #000; color: #000;
} }
.select2-results .select2-no-results, .select2-results .select2-no-results,
.select2-results .select2-searching, .select2-results .select2-searching,
.select2-results .select2-ajax-error,
.select2-results .select2-selection-limit { .select2-results .select2-selection-limit {
background: #f4f4f4; background: #f4f4f4;
display: list-item; display: list-item;
@ -411,6 +454,10 @@ disabled look for disabled choices in the results dropdown
background: #f4f4f4 url('select2-spinner.gif') no-repeat 100%; background: #f4f4f4 url('select2-spinner.gif') no-repeat 100%;
} }
.select2-results .select2-ajax-error {
background: rgba(255, 50, 50, .2);
}
.select2-more-results { .select2-more-results {
background: #f4f4f4; background: #f4f4f4;
display: list-item; display: list-item;
@ -442,7 +489,7 @@ disabled look for disabled choices in the results dropdown
height: auto !important; height: auto !important;
height: 1%; height: 1%;
margin: 0; margin: 0;
padding: 0; padding: 0 5px 0 0;
position: relative; position: relative;
border: 1px solid #aaa; border: 1px solid #aaa;
@ -456,6 +503,10 @@ disabled look for disabled choices in the results dropdown
background-image: linear-gradient(to bottom, #eee 1%, #fff 15%); background-image: linear-gradient(to bottom, #eee 1%, #fff 15%);
} }
html[dir="rtl"] .select2-container-multi .select2-choices {
padding: 0 0 0 5px;
}
.select2-locked { .select2-locked {
padding: 3px 5px 3px 5px !important; padding: 3px 5px 3px 5px !important;
} }
@ -539,8 +590,8 @@ html[dir="rtl"] .select2-container-multi .select2-choices li
} }
html[dir="rtl"] .select2-container-multi .select2-choices .select2-search-choice html[dir="rtl"] .select2-container-multi .select2-choices .select2-search-choice
{ {
margin-left: 0; margin: 3px 5px 3px 0;
margin-right: 5px; padding: 3px 18px 3px 5px;
} }
.select2-container-multi .select2-choices .select2-search-choice .select2-chosen { .select2-container-multi .select2-choices .select2-search-choice .select2-chosen {
cursor: default; cursor: default;
@ -570,6 +621,11 @@ html[dir="rtl"] .select2-search-choice-close {
left: 3px; left: 3px;
} }
html[dir="rtl"] .select2-container-multi .select2-search-choice-close {
left: auto;
right: 2px;
}
.select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover { .select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover {
background-position: right -11px; background-position: right -11px;
} }

View File

@ -11,7 +11,7 @@
"tag", "tag",
"tagging" "tagging"
], ],
"version": "3.4.6", "version": "3.5.0",
"author": { "author": {
"name": "Igor Vaynberg", "name": "Igor Vaynberg",
"url": "https://github.com/ivaynberg" "url": "https://github.com/ivaynberg"

File diff suppressed because one or more lines are too long

View File

@ -6,12 +6,14 @@
(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 + " على الأقل "; },
formatSelectionTooBig: function (limit) { if (n == 1){ return "يمكنك أن تختار إختيار واحد فقط"; } return n == 2 ? "يمكنك أن تختار إختيارين فقط" : "يمكنك أن تختار " + n + " إختيارات فقط"; }, formatSelectionTooBig: function (limit) { if (n == 1){ return "يمكنك أن تختار إختيار واحد فقط"; } return n == 2 ? "يمكنك أن تختار إختيارين فقط" : "يمكنك أن تختار " + n + " إختيارات فقط"; },
formatLoadMore: function (pageNumber) { return "تحميل المزيد من النتائج…"; }, formatLoadMore: function (pageNumber) { return "تحميل المزيد من النتائج…"; },
formatSearching: function () { return "البحث…"; } formatSearching: function () { return "البحث…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['ar']);
})(jQuery); })(jQuery);

18
select2_locale_az.js Normal file
View File

@ -0,0 +1,18 @@
/**
* Select2 Azerbaijani translation.
*
* Author: Farhad Safarov <farhad.safarov@gmail.com>
*/
(function ($) {
"use strict";
$.extend($.fn.select2.defaults, {
formatMatches: function (matches) { return matches + " nəticə mövcuddur, hərəkət etdirmək üçün yuxarı və aşağı düymələrindən istifadə edin."; },
formatNoMatches: function () { return "Nəticə tapılmadı"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return n + " simvol daxil edin"; },
formatInputTooLong: function (input, max) { var n = input.length - max; return n + " simvol silin"; },
formatSelectionTooBig: function (limit) { return "Sadəcə " + limit + " element seçə bilərsiniz"; },
formatLoadMore: function (pageNumber) { return "Daha çox nəticə yüklənir…"; },
formatSearching: function () { return "Axtarılır…"; }
});
})(jQuery);

View File

@ -7,12 +7,14 @@
(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 ? "а" : ""); },
formatSelectionTooBig: function (limit) { return "Можете да направите до " + limit + (limit > 1 ? " избора" : " избор"); }, formatSelectionTooBig: function (limit) { return "Можете да направите до " + limit + (limit > 1 ? " избора" : " избор"); },
formatLoadMore: function (pageNumber) { return "Зареждат се още…"; }, formatLoadMore: function (pageNumber) { return "Зареждат се още…"; },
formatSearching: function () { return "Търсене…"; } formatSearching: function () { return "Търсене…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['bg']);
})(jQuery); })(jQuery);

View File

@ -6,12 +6,14 @@
(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"; },
formatSelectionTooBig: function (limit) { return "Només podeu seleccionar " + limit + " element" + (limit == 1 ? "" : "s"); }, formatSelectionTooBig: function (limit) { return "Només podeu seleccionar " + limit + " element" + (limit == 1 ? "" : "s"); },
formatLoadMore: function (pageNumber) { return "S'estan carregant més resultats…"; }, formatLoadMore: function (pageNumber) { return "S'estan carregant més resultats…"; },
formatSearching: function () { return "S'està cercant…"; } formatSearching: function () { return "S'està cercant…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['ca']);
})(jQuery); })(jQuery);

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;
@ -45,5 +45,7 @@
}, },
formatLoadMore: function (pageNumber) { return "Načítají se další výsledky…"; }, formatLoadMore: function (pageNumber) { return "Načítají se další výsledky…"; },
formatSearching: function () { return "Vyhledávání…"; } formatSearching: function () { return "Vyhledávání…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['cs']);
})(jQuery); })(jQuery);

View File

@ -6,12 +6,14 @@
(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"; },
formatSelectionTooBig: function (limit) { return "Du kan kun vælge " + limit + " emne" + (limit === 1 ? "" : "r"); }, formatSelectionTooBig: function (limit) { return "Du kan kun vælge " + limit + " emne" + (limit === 1 ? "" : "r"); },
formatLoadMore: function (pageNumber) { return "Indlæser flere resultater…"; }, formatLoadMore: function (pageNumber) { return "Indlæser flere resultater…"; },
formatSearching: function () { return "Søger…"; } formatSearching: function () { return "Søger…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['da']);
})(jQuery); })(jQuery);

View File

@ -4,12 +4,15 @@
(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"; },
formatSelectionTooBig: function (limit) { return "Sie können nur " + limit + " Eintr" + (limit === 1 ? "ag" : "äge") + " auswählen"; }, formatSelectionTooBig: function (limit) { return "Sie können nur " + limit + " Eintr" + (limit === 1 ? "ag" : "äge") + " auswählen"; },
formatLoadMore: function (pageNumber) { return "Lade mehr Ergebnisse…"; }, formatLoadMore: function (pageNumber) { return "Lade mehr Ergebnisse…"; },
formatSearching: function () { return "Suche…"; } formatSearching: function () { return "Suche…"; },
}); formatMatches: function (matches) { return matches + " Ergebnis " + (matches > 1 ? "se" : "") + " verfügbar, zum Navigieren die Hoch-/Runter-Pfeiltasten verwenden."; }
};
$.extend($.fn.select2.defaults, $.fn.select2.locales['de']);
})(jQuery); })(jQuery);

View File

@ -6,12 +6,14 @@
(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 ? "ες" : "α"); },
formatSelectionTooBig: function (limit) { return "Μπορείτε να επιλέξετε μόνο " + limit + " αντικείμεν" + (limit > 1 ? "α" : "ο"); }, formatSelectionTooBig: function (limit) { return "Μπορείτε να επιλέξετε μόνο " + limit + " αντικείμεν" + (limit > 1 ? "α" : "ο"); },
formatLoadMore: function (pageNumber) { return "Φόρτωση περισσότερων…"; }, formatLoadMore: function (pageNumber) { return "Φόρτωση περισσότερων…"; },
formatSearching: function () { return "Αναζήτηση…"; } formatSearching: function () { return "Αναζήτηση…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['el']);
})(jQuery); })(jQuery);

View File

@ -1,18 +1,20 @@
/** /**
* Select2 <Language> translation. * Select2 <Language> translation.
* *
* Author: Your Name <your@email> * Author: Your Name <your@email>
*/ */
(function ($) { (function ($) {
"use strict"; "use strict";
$.extend($.fn.select2.defaults, { $.fn.select2.locales['en'] = {
formatMatches: function (matches) { 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 + " more character" + (n == 1 ? "" : "s"); }, 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"); }, 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"); }, formatSelectionTooBig: function (limit) { return "You can only select " + limit + " item" + (limit == 1 ? "" : "s"); },
formatLoadMore: function (pageNumber) { return "Loading more results…"; }, formatLoadMore: function (pageNumber) { return "Loading more results…"; },
formatSearching: function () { return "Searching…"; } formatSearching: function () { return "Searching…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['en']);
})(jQuery); })(jQuery);

View File

@ -4,12 +4,14 @@
(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"); },
formatSelectionTooBig: function (limit) { return "Sólo puede seleccionar " + limit + " elemento" + (limit == 1 ? "" : "s"); }, formatSelectionTooBig: function (limit) { return "Sólo puede seleccionar " + limit + " elemento" + (limit == 1 ? "" : "s"); },
formatLoadMore: function (pageNumber) { return "Cargando más resultados…"; }, formatLoadMore: function (pageNumber) { return "Cargando más resultados…"; },
formatSearching: function () { return "Buscando…"; } formatSearching: function () { return "Buscando…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['es']);
})(jQuery); })(jQuery);

View File

@ -6,12 +6,14 @@
(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"; },
formatSelectionTooBig: function (limit) { return "Saad vaid " + limit + " tulemus" + (limit == 1 ? "e" : "t") + " valida"; }, formatSelectionTooBig: function (limit) { return "Saad vaid " + limit + " tulemus" + (limit == 1 ? "e" : "t") + " valida"; },
formatLoadMore: function (pageNumber) { return "Laen tulemusi.."; }, formatLoadMore: function (pageNumber) { return "Laen tulemusi.."; },
formatSearching: function () { return "Otsin.."; } formatSearching: function () { return "Otsin.."; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['et']);
})(jQuery); })(jQuery);

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";
}, },
@ -39,5 +39,7 @@
formatSearching: function () { formatSearching: function () {
return "Bilatzen…"; return "Bilatzen…";
} }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['eu']);
})(jQuery); })(jQuery);

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 + " نویسه بیشتر وارد نمایید"; },
@ -15,5 +15,7 @@
formatSelectionTooBig: function (limit) { return "شما فقط می‌توانید " + limit + " مورد را انتخاب کنید"; }, formatSelectionTooBig: function (limit) { return "شما فقط می‌توانید " + limit + " مورد را انتخاب کنید"; },
formatLoadMore: function (pageNumber) { return "در حال بارگیری موارد بیشتر…"; }, formatLoadMore: function (pageNumber) { return "در حال بارگیری موارد بیشتر…"; },
formatSearching: function () { return "در حال جستجو…"; } formatSearching: function () { return "در حال جستجو…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['fa']);
})(jQuery); })(jQuery);

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";
}, },
@ -24,5 +24,7 @@
formatSearching: function () { formatSearching: function () {
return "Etsitään…"; return "Etsitään…";
} }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['fi']);
})(jQuery); })(jQuery);

View File

@ -4,12 +4,15 @@
(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."; },
formatNoMatches: function () { return "Aucun résultat trouvé"; }, formatNoMatches: function () { return "Aucun résultat trouvé"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Merci de saisir " + n + " caractère" + (n == 1? "" : "s") + " de plus"; }, formatInputTooShort: function (input, min) { var n = min - input.length; return "Saisissez " + n + " caractère" + (n == 1? "" : "s") + " supplémentaire" + (n == 1? "" : "s") ; },
formatInputTooLong: function (input, max) { var n = input.length - max; return "Merci de supprimer " + n + " caractère" + (n == 1? "" : "s"); }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Supprimez " + n + " caractère" + (n == 1? "" : "s"); },
formatSelectionTooBig: function (limit) { return "Vous pouvez seulement sélectionner " + limit + " élément" + (limit == 1 ? "" : "s"); }, 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…"; }, formatLoadMore: function (pageNumber) { return "Chargement de résultats supplémentaires…"; },
formatSearching: function () { return "Recherche en cours…"; } formatSearching: function () { return "Recherche en cours…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['fr']);
})(jQuery); })(jQuery);

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";
}, },
@ -39,5 +39,7 @@
formatSearching: function () { formatSearching: function () {
return "Buscando…"; return "Buscando…";
} }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['gl']);
})(jQuery); })(jQuery);

View File

@ -6,12 +6,14 @@
(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 + " תווים"; },
formatSelectionTooBig: function (limit) { return "ניתן לבחור " + limit + " פריטים"; }, formatSelectionTooBig: function (limit) { return "ניתן לבחור " + limit + " פריטים"; },
formatLoadMore: function (pageNumber) { return "טוען תוצאות נוספות…"; }, formatLoadMore: function (pageNumber) { return "טוען תוצאות נוספות…"; },
formatSearching: function () { return "מחפש…"; } formatSearching: function () { return "מחפש…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['he']);
})(jQuery); })(jQuery);

View File

@ -7,14 +7,16 @@
(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"; },
formatSelectionTooBig: function (limit) { return "Maksimalan broj odabranih stavki je " + limit; }, formatSelectionTooBig: function (limit) { return "Maksimalan broj odabranih stavki je " + limit; },
formatLoadMore: function (pageNumber) { return "Učitavanje rezultata…"; }, formatLoadMore: function (pageNumber) { return "Učitavanje rezultata…"; },
formatSearching: function () { return "Pretraga…"; } formatSearching: function () { return "Pretraga…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['hr']);
function character (n) { function character (n) {
return " " + n + " znak" + (n%10 < 5 && n%10 > 0 && (n%100 < 5 || n%100 > 19) ? n%10 > 1 ? "a" : "" : "ova"); return " " + n + " znak" + (n%10 < 5 && n%10 > 0 && (n%100 < 5 || n%100 > 19) ? n%10 > 1 ? "a" : "" : "ova");

View File

@ -4,12 +4,14 @@
(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."; },
formatSelectionTooBig: function (limit) { return "Csak " + limit + " elemet lehet kiválasztani."; }, formatSelectionTooBig: function (limit) { return "Csak " + limit + " elemet lehet kiválasztani."; },
formatLoadMore: function (pageNumber) { return "Töltés…"; }, formatLoadMore: function (pageNumber) { return "Töltés…"; },
formatSearching: function () { return "Keresés…"; } formatSearching: function () { return "Keresés…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['hu']);
})(jQuery); })(jQuery);

View File

@ -6,12 +6,14 @@
(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"); },
formatSelectionTooBig: function (limit) { return "Anda hanya dapat memilih " + limit + " pilihan" + (limit == 1 ? "" : "s"); }, formatSelectionTooBig: function (limit) { return "Anda hanya dapat memilih " + limit + " pilihan" + (limit == 1 ? "" : "s"); },
formatLoadMore: function (pageNumber) { return "Mengambil data…"; }, formatLoadMore: function (pageNumber) { return "Mengambil data…"; },
formatSearching: function () { return "Mencari…"; } formatSearching: function () { return "Mencari…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['id']);
})(jQuery); })(jQuery);

View File

@ -4,12 +4,14 @@
(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" : ""); },
formatSelectionTooBig: function (limit) { return "Þú getur aðeins valið " + limit + " atriði"; }, formatSelectionTooBig: function (limit) { return "Þú getur aðeins valið " + limit + " atriði"; },
formatLoadMore: function (pageNumber) { return "Sæki fleiri niðurstöður…"; }, formatLoadMore: function (pageNumber) { return "Sæki fleiri niðurstöður…"; },
formatSearching: function () { return "Leita…"; } formatSearching: function () { return "Leita…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['is']);
})(jQuery); })(jQuery);

View File

@ -4,12 +4,14 @@
(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"; },
formatSelectionTooBig: function (limit) { return "Puoi selezionare solo " + limit + " element" + (limit == 1 ? "o" : "i"); }, formatSelectionTooBig: function (limit) { return "Puoi selezionare solo " + limit + " element" + (limit == 1 ? "o" : "i"); },
formatLoadMore: function (pageNumber) { return "Caricamento in corso…"; }, formatLoadMore: function (pageNumber) { return "Caricamento in corso…"; },
formatSearching: function () { return "Ricerca…"; } formatSearching: function () { return "Ricerca…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['it']);
})(jQuery); })(jQuery);

View File

@ -4,12 +4,14 @@
(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 + "文字長すぎます"; },
formatSelectionTooBig: function (limit) { return "最多で" + limit + "項目までしか選択できません"; }, formatSelectionTooBig: function (limit) { return "最多で" + limit + "項目までしか選択できません"; },
formatLoadMore: function (pageNumber) { return "読込中・・・"; }, formatLoadMore: function (pageNumber) { return "読込中・・・"; },
formatSearching: function () { return "検索中・・・"; } formatSearching: function () { return "検索中・・・"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['ja']);
})(jQuery); })(jQuery);

View File

@ -6,12 +6,14 @@
(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 + " სიმბოლო"; },
formatSelectionTooBig: function (limit) { return "თქვენ შეგიძლიათ მხოლოდ " + limit + " ჩანაწერის მონიშვნა"; }, formatSelectionTooBig: function (limit) { return "თქვენ შეგიძლიათ მხოლოდ " + limit + " ჩანაწერის მონიშვნა"; },
formatLoadMore: function (pageNumber) { return "შედეგის ჩატვირთვა…"; }, formatLoadMore: function (pageNumber) { return "შედეგის ჩატვირთვა…"; },
formatSearching: function () { return "ძებნა…"; } formatSearching: function () { return "ძებნა…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['ka']);
})(jQuery); })(jQuery);

View File

@ -6,12 +6,14 @@
(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+"글자 지워주세요."; },
formatSelectionTooBig: function (limit) { return "최대 "+limit+"개까지만 선택하실 수 있습니다."; }, formatSelectionTooBig: function (limit) { return "최대 "+limit+"개까지만 선택하실 수 있습니다."; },
formatLoadMore: function (pageNumber) { return "불러오는 중…"; }, formatLoadMore: function (pageNumber) { return "불러오는 중…"; },
formatSearching: function () { return "검색 중…"; } formatSearching: function () { return "검색 중…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['ko']);
})(jQuery); })(jQuery);

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); },
@ -16,7 +16,9 @@
}, },
formatLoadMore: function (pageNumber) { return "Kraunama daugiau rezultatų…"; }, formatLoadMore: function (pageNumber) { return "Kraunama daugiau rezultatų…"; },
formatSearching: function () { return "Ieškoma…"; } formatSearching: function () { return "Ieškoma…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['lt']);
function character (n) { function character (n) {
return " " + n + " simbol" + ((n%100 > 9 && n%100 < 21) || n%10 == 0 ? "ių" : n%10 > 1 ? "ius" : "į"); return " " + n + " simbol" + ((n%100 > 9 && n%100 < 21) || n%10 == 0 ? "ių" : n%10 > 1 ? "ius" : "į");

View File

@ -6,12 +6,14 @@
(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"; },
formatSelectionTooBig: function (limit) { return "Jūs varat izvēlēties ne vairāk kā " + limit + " element" + (limit == 11 ? "us" : limit%10 == 1 ? "u" : "us"); }, 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…"; }, formatLoadMore: function (pageNumber) { return "Datu ielāde…"; },
formatSearching: function () { return "Meklēšana…"; } formatSearching: function () { return "Meklēšana…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['lv']);
})(jQuery); })(jQuery);

View File

@ -6,12 +6,14 @@
(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? "" : "и"); },
formatSelectionTooBig: function (limit) { return "Можете да изберете само " + limit + " ставк" + (limit == 1 ? "а" : "и"); }, formatSelectionTooBig: function (limit) { return "Можете да изберете само " + limit + " ставк" + (limit == 1 ? "а" : "и"); },
formatLoadMore: function (pageNumber) { return "Вчитување резултати…"; }, formatLoadMore: function (pageNumber) { return "Вчитување резултати…"; },
formatSearching: function () { return "Пребарување…"; } formatSearching: function () { return "Пребарување…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['mk']);
})(jQuery); })(jQuery);

View File

@ -6,12 +6,14 @@
(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"; },
formatSelectionTooBig: function (limit) { return "Anda hanya boleh memilih " + limit + " pilihan"; }, formatSelectionTooBig: function (limit) { return "Anda hanya boleh memilih " + limit + " pilihan"; },
formatLoadMore: function (pageNumber) { return "Sedang memuatkan keputusan…"; }, formatLoadMore: function (pageNumber) { return "Sedang memuatkan keputusan…"; },
formatSearching: function () { return "Mencari…"; } formatSearching: function () { return "Mencari…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['ms']);
})(jQuery); })(jQuery);

View File

@ -4,12 +4,14 @@
(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"; },
formatSelectionTooBig: function (limit) { return "Maximaal " + limit + " item" + (limit == 1 ? "" : "s") + " toegestaan"; }, formatSelectionTooBig: function (limit) { return "Maximaal " + limit + " item" + (limit == 1 ? "" : "s") + " toegestaan"; },
formatLoadMore: function (pageNumber) { return "Meer resultaten laden…"; }, formatLoadMore: function (pageNumber) { return "Meer resultaten laden…"; },
formatSearching: function () { return "Zoeken…"; } formatSearching: function () { return "Zoeken…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['nl']);
})(jQuery); })(jQuery);

View File

@ -6,13 +6,15 @@
(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"; },
formatSelectionTooBig: function (limit) { return "Du kan velge maks " + limit + " elementer"; }, formatSelectionTooBig: function (limit) { return "Du kan velge maks " + limit + " elementer"; },
formatLoadMore: function (pageNumber) { return "Laster flere resultater…"; }, formatLoadMore: function (pageNumber) { return "Laster flere resultater…"; },
formatSearching: function () { return "Søker…"; } formatSearching: function () { return "Søker…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['no']);
})(jQuery); })(jQuery);

View File

@ -3,18 +3,21 @@
* *
* @author Jan Kondratowicz <jan@kondratowicz.pl> * @author Jan Kondratowicz <jan@kondratowicz.pl>
* @author Uriy Efremochkin <efremochkin@uriy.me> * @author Uriy Efremochkin <efremochkin@uriy.me>
* @author Michał Połtyn <mike@poltyn.com>
*/ */
(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 jeszcze" + 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"); },
formatSelectionTooBig: function (limit) { return "Możesz zaznaczyć najwyżej" + character(limit, "element", "y"); }, formatSelectionTooBig: function (limit) { return "Możesz zaznaczyć najwyżej" + character(limit, "element", "y"); },
formatLoadMore: function (pageNumber) { return "Ładowanie wyników…"; }, formatLoadMore: function (pageNumber) { return "Ładowanie wyników…"; },
formatSearching: function () { return "Szukanie…"; } formatSearching: function () { return "Szukanie…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['pl']);
function character (n, word, pluralSuffix) { function character (n, word, pluralSuffix) {
return " " + n + " " + word + (n == 1 ? "" : n%10 < 5 && n%10 > 1 && (n%100 < 5 || n%100 > 20) ? pluralSuffix : "ów"); return " " + n + " " + word + (n == 1 ? "" : n%10 < 5 && n%10 > 1 && (n%100 < 5 || n%100 > 20) ? pluralSuffix : "ów");

View File

@ -4,12 +4,14 @@
(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 "Informe " + n + " caractere" + (n == 1? "" : "s"); }, 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 + " caractere" + (n == 1? "" : "s"); }, formatInputTooLong: function (input, max) { var n = input.length - max; return "Apague " + n + " caracter" + (n == 1? "" : "es"); },
formatSelectionTooBig: function (limit) { return "Só é possível selecionar " + limit + " elemento" + (limit == 1 ? "" : "s"); }, formatSelectionTooBig: function (limit) { return "Só é possível selecionar " + limit + " elemento" + (limit == 1 ? "" : "s"); },
formatLoadMore: function (pageNumber) { return "Carregando mais resultados…"; }, formatLoadMore: function (pageNumber) { return "Carregando mais resultados…"; },
formatSearching: function () { return "Buscando…"; } formatSearching: function () { return "Buscando…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['pt-BR']);
})(jQuery); })(jQuery);

View File

@ -4,12 +4,14 @@
(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"); },
formatSelectionTooBig: function (limit) { return "Só é possível selecionar " + limit + " elemento" + (limit == 1 ? "" : "s"); }, formatSelectionTooBig: function (limit) { return "Só é possível selecionar " + limit + " elemento" + (limit == 1 ? "" : "s"); },
formatLoadMore: function (pageNumber) { return "A carregar mais resultados…"; }, formatLoadMore: function (pageNumber) { return "A carregar mais resultados…"; },
formatSearching: function () { return "A pesquisar…"; } formatSearching: function () { return "A pesquisar…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['pt-PT']);
})(jQuery); })(jQuery);

View File

@ -4,12 +4,14 @@
(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"); },
formatSelectionTooBig: function (limit) { return "Aveți voie să selectați cel mult " + limit + " element" + (limit == 1 ? "" : "e"); }, formatSelectionTooBig: function (limit) { return "Aveți voie să selectați cel mult " + limit + " element" + (limit == 1 ? "" : "e"); },
formatLoadMore: function (pageNumber) { return "Se încarcă…"; }, formatLoadMore: function (pageNumber) { return "Se încarcă…"; },
formatSearching: function () { return "Căutare…"; } formatSearching: function () { return "Căutare…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['ro']);
})(jQuery); })(jQuery);

View File

@ -6,12 +6,14 @@
(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"); },
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")); }, 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…"; }, formatLoadMore: function (pageNumber) { return "Preuzimanje još rezultata…"; },
formatSearching: function () { return "Pretraga…"; } formatSearching: function () { return "Pretraga…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['rs']);
})(jQuery); })(jQuery);

View File

@ -6,14 +6,16 @@
(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) + " меньше"; },
formatSelectionTooBig: function (limit) { return "Вы можете выбрать не более " + limit + " элемент" + (limit%10 == 1 && limit%100 != 11 ? "а" : "ов"); }, formatSelectionTooBig: function (limit) { return "Вы можете выбрать не более " + limit + " элемент" + (limit%10 == 1 && limit%100 != 11 ? "а" : "ов"); },
formatLoadMore: function (pageNumber) { return "Загрузка данных…"; }, formatLoadMore: function (pageNumber) { return "Загрузка данных…"; },
formatSearching: function () { return "Поиск…"; } formatSearching: function () { return "Поиск…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['ru']);
function character (n) { function character (n) {
return " " + n + " символ" + (n%10 < 5 && n%10 > 0 && (n%100 < 5 || n%100 > 20) ? n%10 > 1 ? "a" : "" : "ов"); return " " + n + " символ" + (n%10 < 5 && n%10 > 0 && (n%100 < 5 || n%100 > 20) ? n%10 > 1 ? "a" : "" : "ов");

View File

@ -10,8 +10,8 @@
2: function(masc) { return (masc ? "dva" : "dve"); }, 2: function(masc) { return (masc ? "dva" : "dve"); },
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;
@ -44,5 +44,7 @@
}, },
formatLoadMore: function (pageNumber) { return "Načítavajú sa ďalšie výsledky…"; }, formatLoadMore: function (pageNumber) { return "Načítavajú sa ďalšie výsledky…"; },
formatSearching: function () { return "Vyhľadávanie…"; } formatSearching: function () { return "Vyhľadávanie…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['sk']);
})(jQuery); })(jQuery);

View File

@ -6,12 +6,14 @@
(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"; },
formatSelectionTooBig: function (limit) { return "Du kan max välja " + limit + " element"; }, formatSelectionTooBig: function (limit) { return "Du kan max välja " + limit + " element"; },
formatLoadMore: function (pageNumber) { return "Laddar fler resultat…"; }, formatLoadMore: function (pageNumber) { return "Laddar fler resultat…"; },
formatSearching: function () { return "Söker…"; } formatSearching: function () { return "Söker…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['sv']);
})(jQuery); })(jQuery);

View File

@ -6,12 +6,14 @@
(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 + " ตัวอักษร"; },
formatSelectionTooBig: function (limit) { return "คุณสามารถเลือกได้ไม่เกิน " + limit + " รายการ"; }, formatSelectionTooBig: function (limit) { return "คุณสามารถเลือกได้ไม่เกิน " + limit + " รายการ"; },
formatLoadMore: function (pageNumber) { return "กำลังค้นข้อมูลเพิ่ม…"; }, formatLoadMore: function (pageNumber) { return "กำลังค้นข้อมูลเพิ่ม…"; },
formatSearching: function () { return "กำลังค้นข้อมูล…"; } formatSearching: function () { return "กำลังค้นข้อมูล…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['th']);
})(jQuery); })(jQuery);

View File

@ -6,12 +6,14 @@
(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"; },
formatSelectionTooBig: function (limit) { return "Sadece " + limit + " seçim yapabilirsiniz"; }, formatSelectionTooBig: function (limit) { return "Sadece " + limit + " seçim yapabilirsiniz"; },
formatLoadMore: function (pageNumber) { return "Daha fazla…"; }, formatLoadMore: function (pageNumber) { return "Daha fazla…"; },
formatSearching: function () { return "Aranıyor…"; } formatSearching: function () { return "Aranıyor…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['tr']);
})(jQuery); })(jQuery);

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, "символ"); },
@ -15,7 +15,9 @@
formatSelectionTooBig: function (limit) { return "Ви можете вибрати лише " + character(limit, "елемент"); }, formatSelectionTooBig: function (limit) { return "Ви можете вибрати лише " + character(limit, "елемент"); },
formatLoadMore: function (pageNumber) { return "Завантаження даних…"; }, formatLoadMore: function (pageNumber) { return "Завантаження даних…"; },
formatSearching: function () { return "Пошук…"; } formatSearching: function () { return "Пошук…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['uk']);
function character (n, word) { function character (n, word) {
return n + " " + word + (n%10 < 5 && n%10 > 0 && (n%100 < 5 || n%100 > 19) ? n%10 > 1 ? "и" : "" : "ів"); return n + " " + word + (n%10 < 5 && n%10 > 0 && (n%100 < 5 || n%100 > 19) ? n%10 > 1 ? "и" : "" : "ів");

View File

@ -6,13 +6,15 @@
(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"); },
formatSelectionTooBig: function (limit) { return "Chỉ có thể chọn được " + limit + " tùy chọn" + (limit == 1 ? "" : "s"); }, 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ả…"; }, formatLoadMore: function (pageNumber) { return "Đang lấy thêm kết quả…"; },
formatSearching: function () { return "Đang tìm…"; } formatSearching: function () { return "Đang tìm…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['vi']);
})(jQuery); })(jQuery);

View File

@ -3,12 +3,14 @@
*/ */
(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 + "个字符";},
formatSelectionTooBig: function (limit) { return "你只能选择最多" + limit + "项"; }, formatSelectionTooBig: function (limit) { return "你只能选择最多" + limit + "项"; },
formatLoadMore: function (pageNumber) { return "加载结果中…"; }, formatLoadMore: function (pageNumber) { return "加载结果中…"; },
formatSearching: function () { return "搜索中…"; } formatSearching: function () { return "搜索中…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['zh-CN']);
})(jQuery); })(jQuery);

6
select2_locale_zh-TW.js Executable file → Normal file
View File

@ -3,12 +3,14 @@
*/ */
(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 + "個字元";},
formatSelectionTooBig: function (limit) { return "你只能選擇最多" + limit + "項"; }, formatSelectionTooBig: function (limit) { return "你只能選擇最多" + limit + "項"; },
formatLoadMore: function (pageNumber) { return "載入中…"; }, formatLoadMore: function (pageNumber) { return "載入中…"; },
formatSearching: function () { return "搜尋中…"; } formatSearching: function () { return "搜尋中…"; }
}); };
$.extend($.fn.select2.defaults, $.fn.select2.locales['zh-TW']);
})(jQuery); })(jQuery);