function _datex_language_calendar_name in Datex 7.3
Same name and namespace in other branches
- 8 datex.inc.php \_datex_language_calendar_name()
Get calendar for a/current language from schema.
Parameters
string $for_schema:
null $for_lang:
Return value
null
4 calls to _datex_language_calendar_name()
- datex_factory in ./
datex.module - Creates a new datex calendar object.
- _datex_date_field_calendar in ./
datex_date.inc - Create a datex-calendar based on field config and the schema set for it.
- _datex_date_views_argument_handler_simple::_datex in ./
datex.views.inc - Handle the date and convert it accordingly.
- _datex_views_handler_field_date::render in ./
datex.views.inc - Render the date, if it should be localized. Otherwise let parent handle it.
File
- ./
datex.module, line 263 - Datex main module file, Datex adds php-intl support to drupal.
Code
function _datex_language_calendar_name($for_schema = 'default', $for_lang = NULL) {
if (!$for_lang) {
$for_lang = $GLOBALS['language']->language;
}
if (!$for_schema) {
$for_schema = 'default';
}
$cfg = variable_get('datex_schema', []);
return isset($cfg[$for_schema][$for_lang]) ? $cfg[$for_schema][$for_lang] : NULL;
}