You are here

function _datex_language_calendar in Datex 7.2

Get calendar for a/current language in a mode (if given) from schema.

5 calls to _datex_language_calendar()
datex_datex_format_alter in ./datex.module
Implements hook_datex_format_alter().
datex_handler_field_date::render in views/datex_handler_field_date.inc
Render the field.
_datex_factory in ./datex.module
Factory of datex object.
_datex_factory_with_defaults in ./datex.module
Factory of datex object with some default values.
_datex_field_calendar in ./datex_date.inc
Find suitable calendar for field.

File

./datex.module, line 119
Convert output of date_format() to Jalali in a patched drupal installation.

Code

function _datex_language_calendar($locale = NULL, $mode = NULL, $schema = 'default') {
  if ($mode) {
    if ($mode != _datex_cfg('mode')) {
      return FALSE;
    }
  }
  if (!$locale) {
    $locale = $GLOBALS['language']->language;
  }
  $cfg = variable_get('datex_schema', array());
  if (!isset($cfg[$schema][$locale])) {
    return FALSE;
  }
  return $cfg[$schema][$locale];
}