ar_TN.php
6 years ago
ca_ES.php
6 years ago
cs_CZ.php
6 years ago
da_DK.php
6 years ago
de_DE.php
6 years ago
en_GB.php
6 years ago
en_US.php
6 years ago
es_ES.php
6 years ago
fr_FR.php
6 years ago
hu_HU.php
6 years ago
id_ID.php
6 years ago
it_IT.php
6 years ago
ja_JP.php
6 years ago
ko_KR.php
6 years ago
lv_LV.php
6 years ago
nl_NL.php
6 years ago
no_NO.php
6 years ago
oc_LNC.php
6 years ago
pl_PL.php
6 years ago
pt_BR.php
6 years ago
pt_PT.php
6 years ago
ro_RO.php
6 years ago
ru_RU.php
6 years ago
se_SV.php
6 years ago
th_TH.php
6 years ago
tr_TR.php
6 years ago
uk_UA.php
6 years ago
vi_VN.php
6 years ago
zh_CN.php
6 years ago
zh_TW.php
6 years ago
pl_PL.php
87 lines
| 1 | <?php |
| 2 | |
| 3 | // locale: Polski (Poland) (pl_PL) |
| 4 | // author: Mateusz Błaszczyk https://github.com/Zaszczyk |
| 5 | |
| 6 | use Moment\Moment; |
| 7 | |
| 8 | $ifLastDigitIsSpecial = function ($count, $trueString, $falseString) |
| 9 | { |
| 10 | $specialDigits = array('2', '3', '4'); |
| 11 | |
| 12 | return |
| 13 | (in_array(mb_substr((string)$count, -1), $specialDigits) && $count > 20) |
| 14 | || in_array((string)$count, $specialDigits) |
| 15 | ? $trueString : $falseString; |
| 16 | }; |
| 17 | |
| 18 | $femaleWeekdays = array('3', '6', '7'); |
| 19 | |
| 20 | return array( |
| 21 | "months" => explode('_', 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'), |
| 22 | "monthsNominative" => explode('_', 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'), |
| 23 | "monthsShort" => explode('_', 'sty._lut._mar._kwi._maj_cze._lip._sie._wrz._paź._lis._gru.'), |
| 24 | "weekdays" => explode('_', 'poniedziałek_wtorek_środa_czwartek_pi� |
| 25 | tek_sobota_niedziela'), |
| 26 | "weekdaysShort" => explode('_', 'pon._wt._śr._czw._pt._sob._niedz.'), |
| 27 | "calendar" => array( |
| 28 | "sameDay" => '[dzisiaj]', |
| 29 | "nextDay" => '[jutro]', |
| 30 | "lastDay" => '[wczoraj]', |
| 31 | "lastWeek" => function (Moment $moment) use ($femaleWeekdays) |
| 32 | { |
| 33 | $pre = 'ostatni'; |
| 34 | |
| 35 | if (in_array($moment->getWeekday(), $femaleWeekdays)) |
| 36 | { |
| 37 | $pre = 'ostatnia'; |
| 38 | } |
| 39 | |
| 40 | return '[' . $pre . '] l'; |
| 41 | }, |
| 42 | "sameElse" => 'l', |
| 43 | "withTime" => '[o] H:i', |
| 44 | "default" => 'd.m.Y', |
| 45 | ), |
| 46 | "relativeTime" => array( |
| 47 | "future" => 'za %s', |
| 48 | "past" => '%s temu', |
| 49 | "s" => 'kilka sekund', |
| 50 | "ss" => function ($count) use ($ifLastDigitIsSpecial) |
| 51 | { |
| 52 | return $ifLastDigitIsSpecial($count, '%d sekundy', '%d sekund'); |
| 53 | }, |
| 54 | "m" => '1 minutę', |
| 55 | "mm" => function ($count) use ($ifLastDigitIsSpecial) |
| 56 | { |
| 57 | return $ifLastDigitIsSpecial($count, '%d minuty', '%d minut'); |
| 58 | }, |
| 59 | "h" => '1 godzinę', |
| 60 | "hh" => function ($count) use ($ifLastDigitIsSpecial) |
| 61 | { |
| 62 | return $ifLastDigitIsSpecial($count, '%d godziny', '%d godzin'); |
| 63 | }, |
| 64 | "d" => '1 dzień', |
| 65 | "dd" => '%d dni', |
| 66 | "M" => '1 miesi� |
| 67 | c', |
| 68 | "MM" => function ($count) use ($ifLastDigitIsSpecial) |
| 69 | { |
| 70 | return $ifLastDigitIsSpecial($count, '%d miesi� |
| 71 | ce', '%d miesięcy'); |
| 72 | }, |
| 73 | "y" => '1 rok', |
| 74 | "yy" => function ($count) use ($ifLastDigitIsSpecial) |
| 75 | { |
| 76 | return $ifLastDigitIsSpecial($count, '%d lata', '%d lat'); |
| 77 | }, |
| 78 | ), |
| 79 | "ordinal" => function ($number) |
| 80 | { |
| 81 | return $number . '.'; |
| 82 | }, |
| 83 | "week" => array( |
| 84 | "dow" => 1, // Monday is the first day of the week. |
| 85 | "doy" => 4 // The week that contains Jan 4th is the first week of the year. |
| 86 | ), |
| 87 | ); |