select2_locale_lt.js 1.1 KB

1234567891011121314151617181920212223242526
  1. /**
  2. * Select2 Lithuanian translation.
  3. *
  4. * @author CRONUS Karmalakas <cronus dot karmalakas at gmail dot com>
  5. * @author Uriy Efremochkin <[email protected]>
  6. */
  7. (function ($) {
  8. "use strict";
  9. $.fn.select2.locales['lt'] = {
  10. formatNoMatches: function () { return "Atitikmenų nerasta"; },
  11. formatInputTooShort: function (input, min) { return "Įrašykite dar" + character(min - input.length); },
  12. formatInputTooLong: function (input, max) { return "Pašalinkite" + character(input.length - max); },
  13. formatSelectionTooBig: function (limit) {
  14. return "Jūs galite pasirinkti tik " + limit + " element" + ((limit%100 > 9 && limit%100 < 21) || limit%10 == 0 ? "ų" : limit%10 > 1 ? "us" : "ą");
  15. },
  16. formatLoadMore: function (pageNumber) { return "Kraunama daugiau rezultatų…"; },
  17. formatSearching: function () { return "Ieškoma…"; }
  18. };
  19. $.extend($.fn.select2.defaults, $.fn.select2.locales['lt']);
  20. function character (n) {
  21. return " " + n + " simbol" + ((n%100 > 9 && n%100 < 21) || n%10 == 0 ? "ių" : n%10 > 1 ? "ius" : "į");
  22. }
  23. })(jQuery);