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
cs_CZ.php
108 lines
| 1 | <?php |
| 2 | |
| 3 | // locale: Czech (Czech Republic) (cs_CZ) |
| 4 | // author: Jan Ptacek https://github.com/ptica |
| 5 | |
| 6 | use Moment\Moment; |
| 7 | |
| 8 | /** |
| 9 | * @param string $direction |
| 10 | * @param string $trueString |
| 11 | * @param string $falseString |
| 12 | * |
| 13 | * @return string |
| 14 | */ |
| 15 | $ifPast = function ($direction, $trueString, $falseString) |
| 16 | { |
| 17 | return $direction === 'past' ? $trueString : $falseString; |
| 18 | }; |
| 19 | |
| 20 | /** |
| 21 | * @param int $count |
| 22 | * @param int $countSmallerThan |
| 23 | * @param string $trueString |
| 24 | * @param string $falseString |
| 25 | * |
| 26 | * @return string |
| 27 | */ |
| 28 | $ifCountSmaller = function ($count, $countSmallerThan, $trueString, $falseString) |
| 29 | { |
| 30 | return $count < $countSmallerThan ? $trueString : $falseString; |
| 31 | }; |
| 32 | |
| 33 | return array( |
| 34 | "months" => explode('_', 'ledna_února_března_dubna_května_června_července_srpna_září_října_listopadu_prosince'), |
| 35 | "monthsShort" => explode('_', 'Led_Úno_Bře_Dub_Kvě_Čer_Čvc_Srp_Zář_Říj_Lis_Pro'), |
| 36 | "weekdays" => explode('_', 'pondělí_úterý_středa_čtvrtek_pátek_sobota_neděle'), |
| 37 | "weekdaysShort" => explode('_', 'po_út_st_čt_pá_so_ne'), |
| 38 | "calendar" => array( |
| 39 | "sameDay" => '[dnes]', |
| 40 | "nextDay" => '[zítra]', |
| 41 | "lastDay" => '[včera]', |
| 42 | "lastWeek" => '[minulý] l', |
| 43 | "sameElse" => 'l', |
| 44 | "withTime" => '[v] H:i', |
| 45 | "default" => 'd.m.Y', |
| 46 | ), |
| 47 | "relativeTime" => array( |
| 48 | "future" => 'za %s', |
| 49 | "past" => 'před %s', |
| 50 | "s" => function ($count, $direction, Moment $m) use ($ifPast) |
| 51 | { |
| 52 | return $ifPast($direction, 'okamžikem', 'okamžik'); |
| 53 | }, |
| 54 | "ss" => function ($count, $direction, Moment $m) use ($ifPast) |
| 55 | { |
| 56 | return $ifPast($direction, 'okamžikem', 'okamžik'); |
| 57 | }, |
| 58 | "m" => function ($count, $direction, Moment $m) use ($ifPast) |
| 59 | { |
| 60 | return $ifPast($direction, 'minutou', 'minutu'); |
| 61 | }, |
| 62 | "mm" => function ($count, $direction, Moment $m) use ($ifPast, $ifCountSmaller) |
| 63 | { |
| 64 | return $ifPast($direction, '%d minutami', $ifCountSmaller($count, 5, '%d minuty', '%d minut')); |
| 65 | }, |
| 66 | "h" => function ($count, $direction, Moment $m) use ($ifPast, $ifCountSmaller) |
| 67 | { |
| 68 | return $ifPast($direction, 'hodinou', 'hodinu'); |
| 69 | }, |
| 70 | "hh" => function ($count, $direction, Moment $m) use ($ifPast, $ifCountSmaller) |
| 71 | { |
| 72 | return $ifPast($direction, '%d hodinami', $ifCountSmaller($count, 5, '%d hodiny', '%d hodin')); |
| 73 | }, |
| 74 | "d" => function ($count, $direction, Moment $m) use ($ifPast) |
| 75 | { |
| 76 | return $ifPast($direction, 'dnem', 'den'); |
| 77 | }, |
| 78 | "dd" => function ($count, $direction, Moment $m) use ($ifPast, $ifCountSmaller) |
| 79 | { |
| 80 | return $ifPast($direction, '%d dny', $ifCountSmaller($count, 5, '%d dny', '%d dnů')); |
| 81 | }, |
| 82 | "M" => function ($count, $direction, Moment $m) use ($ifPast) |
| 83 | { |
| 84 | return $ifPast($direction, 'měsícem', 'měsíc'); |
| 85 | }, |
| 86 | "MM" => function ($count, $direction, Moment $m) use ($ifPast, $ifCountSmaller) |
| 87 | { |
| 88 | return $ifPast($direction, '%d měsíci', $ifCountSmaller($count, 5, '%d měsíce', '%d měsíců')); |
| 89 | }, |
| 90 | "y" => function ($count, $direction, Moment $m) use ($ifPast) |
| 91 | { |
| 92 | return $ifPast($direction, 'rokem', 'rok'); |
| 93 | }, |
| 94 | "yy" => function ($count, $direction, Moment $m) use ($ifPast, $ifCountSmaller) |
| 95 | { |
| 96 | return $ifPast($direction, $ifCountSmaller($count, 5, '%d roky', '%d lety'), $ifCountSmaller($count, 5, '%d roky', '%d let')); |
| 97 | }, |
| 98 | ), |
| 99 | "ordinal" => function ($number) |
| 100 | { |
| 101 | return $number . '.'; |
| 102 | }, |
| 103 | "week" => array( |
| 104 | "dow" => 1, // Monday is the first day of the week. |
| 105 | "doy" => 4 // The week that contains Jan 4th is the first week of the year. |
| 106 | ), |
| 107 | ); |
| 108 |