<?php
// locale: ??????? (Qazaqstan) (kz_KZ)
// author: Aibek Q https://github.com/AibekQ
/**
* @param int $number
* @param string $word
* @param string $time
* @return string
*/
$getTimeSuffix = function ($number, $word, $time) {
switch ($word) {
case '??????':
case '?????':
case '?????':
if ($time == 'future') {
$word .= '???';
}
break;
case '???':
if ($time == 'future') {
$word .= '???';
}
break;
case '??':
case '???':
if ($time == 'future') {
$word .= '???';
}
break;
}
return "{$number} {$word}";
};
return array(
'months' => explode('_', '??????_?????_??????_?????_?????_??????_?????_?????_????????_?????_??????_?????????'),
'monthsNominative' => explode('_', '??????_?????_??????_?????_?????_??????_?????_?????_????????_?????_??????_?????????'),
'monthsShort' => explode('_', '???_???_???_???_???_???_???_???_???_???_???_???'),
'weekdays' => explode('_', '????????_????????_????????_????????_????_?????_????????'),
'weekdaysShort' => explode('_', '??_?c_??_??_??_??_??'),
'calendar' => array(
'sameDay' => '[?????]',
'nextDay' => '[?????]',
'lastDay' => '[????]',
'lastWeek' => 'l',
'sameElse' => 'l',
'withTime' => 'H:i ???????',
'default' => 'd.m.Y',
),
'relativeTime' => array(
'future' => '%s ?????',
'past' => '%s ?????',
's' => function ($number, $time) use ($getTimeSuffix) {
return $getTimeSuffix($number, '??????', $time);
},
'ss' => function ($number, $time) use ($getTimeSuffix) {
return $getTimeSuffix($number, '??????', $time);
},
'm' => function ($number, $time) use ($getTimeSuffix) {
return $getTimeSuffix($number, '?????', $time);
},
'mm' => function ($number, $time) use ($getTimeSuffix) {
return $getTimeSuffix($number, '?????', $time);
},
'h' => function ($number, $time) use ($getTimeSuffix) {
return $getTimeSuffix($number, '?????', $time);
},
'hh' => function ($number, $time) use ($getTimeSuffix) {
return $getTimeSuffix($number, '?????', $time);
},
'd' => function ($number, $time) use ($getTimeSuffix) {
return $getTimeSuffix($number, '???', $time);
},
'dd' => function ($number, $time) use ($getTimeSuffix) {
return $getTimeSuffix($number, '???', $time);
},
'M' => function ($number, $time) use ($getTimeSuffix) {
return $getTimeSuffix($number, '??', $time);
},
'MM' => function ($number, $time) use ($getTimeSuffix) {
return $getTimeSuffix($number, '??', $time);
},
'y' => function ($number, $time) use ($getTimeSuffix) {
return $getTimeSuffix($number, '???', $time);
},
'yy' => function ($number, $time) use ($getTimeSuffix) {
return $getTimeSuffix($number, '???', $time);
},
),
'ordinal' => function ($number) {
return $number . '?';
},
'week' => array(
'dow' => 1, // Monday is the first day of the week.
'doy' => 4 // The week that contains Jan 4th is the first week of the year.
),
);
|