function _datex_api_get_language_locale_calendar in Datex 7.2
Finds suitable jquery calendar localization for a datex calendar.
Datex and jquery calendars locale names might be different, Sush as Datex: Jalali and jQuery Calendars: Persian.
@TODO complete the list.
File
- datex_api/
datex_api.module, line 131
Code
function _datex_api_get_language_locale_calendar($language) {
if ($language === TRUE) {
$language = $GLOBALS['language']->language;
}
$calendars = array(
'persian' => array(
'fa',
'jalali',
'persian',
'iranian',
),
'gregorian' => array(
'en',
'gregorian',
),
);
foreach ($calendars as $calendar => $langs) {
if (in_array($language, $langs)) {
return $calendar;
}
}
// Not found.
return FALSE;
}