1/**
2 * Select2 Croatian translation.
3 *
4 * @author  Edi Modrić <edi.modric@gmail.com>
5 * @author  Uriy Efremochkin <efremochkin@uriy.me>
6 */
7(function ($) {
8    "use strict";
9
10    $.extend($.fn.select2.defaults, {
11        formatNoMatches: function () { return "Nema rezultata"; },
12        formatInputTooShort: function (input, min) { return "Unesite još" + character(min - input.length); },
13        formatInputTooLong: function (input, max) { return "Unesite" + character(input.length - max) + " manje"; },
14        formatSelectionTooBig: function (limit) { return "Maksimalan broj odabranih stavki je " + limit; },
15        formatLoadMore: function (pageNumber) { return "Učitavanje rezultata…"; },
16        formatSearching: function () { return "Pretraga…"; }
17    });
18
19    function character (n) {
20        return " " + n + " znak" + (n%10 < 5 && n%10 > 0 && (n%100 < 5 || n%100 > 19) ? n%10 > 1 ? "a" : "" : "ova");
21    }
22})(jQuery);
23