Skip to content

Commit e663447

Browse files
committed
Create Slovak localisation file
1 parent dd34cc5 commit e663447

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

select2_locale_sk.js

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/**
2+
* Select2 Slovak translation.
3+
*
4+
* Author: David Vallner <david@vallner.net>
5+
*/
6+
(function ($) {
7+
"use strict";
8+
// use text for the numbers 2 through 4
9+
var smallNumbers = {
10+
2: function(masc) { return (masc ? "dva" : "dve"); },
11+
3: function() { return "tri"; },
12+
4: function() { return "štyri"; }
13+
}
14+
$.extend($.fn.select2.defaults, {
15+
formatNoMatches: function () { return "Nenašli sa žiadne položky"; },
16+
formatInputTooShort: function (input, min) {
17+
var n = min - input.length;
18+
if (n == 1) {
19+
return "Prosím zadajte ešte jeden znak";
20+
} else if (n <= 4) {
21+
return "Prosím zadajte ešte ďalšie "+smallNumbers[n](true)+" znaky";
22+
} else {
23+
return "Prosím zadajte ešte ďalších "+n+" znakov";
24+
}
25+
},
26+
formatInputTooLong: function (input, max) {
27+
var n = input.length - max;
28+
if (n == 1) {
29+
return "Prosím zadajte o jeden znak menej";
30+
} else if (n <= 4) {
31+
return "Prosím zadajte o "+smallNumbers[n](true)+" znaky menej";
32+
} else {
33+
return "Prosím zadajte o "+n+" znakov menej";
34+
}
35+
},
36+
formatSelectionTooBig: function (limit) {
37+
if (limit == 1) {
38+
return "Môžete zvoliť len jednu položku";
39+
} else if (limit <= 4) {
40+
return "Môžete zvoliť najviac "+smallNumbers[limit](false)+" položky";
41+
} else {
42+
return "Môžete zvoliť najviac "+limit+" položiek";
43+
}
44+
},
45+
formatLoadMore: function (pageNumber) { return "Načítavajú sa ďalšie výsledky..."; },
46+
formatSearching: function () { return "Vyhľadávanie..."; }
47+
});
48+
})(jQuery);

0 commit comments

Comments
 (0)