You are here

function _datex_skip_language in Datex 7

Helper to determine if datex should skip the given language.

If user has enabled for the given language, This function will return FALSE, Which means the language should not be skipped, In other words, If datex is not enabled for the given language it should be skiped and dates should not be represented in Jalali.

9 calls to _datex_skip_language()
datex_datex_format_alter in ./datex.module
Implements hook_datex_format_alter().
datex_date_date_select_process_alter in datex_date/datex_date.module
Implements hook date_select_process_alter().
datex_form_alter in ./datex.module
Implements hook_form_alter().
datex_handler_field_date::render in views/datex_handler_field_date.inc
Called by views to render field.
datex_preprocess_comment in ./datex.module
Implements hook_preprocess_comment().

... See full list

File

datex_api/datex_api.module, line 292

Code

function _datex_skip_language($language = NULL) {
  if (!$language) {
    $language = $GLOBALS['language']->language;
  }
  $enabled_languages = variable_get('datex_api_enabled_langs', array(
    'fa' => 'fa',
  ));
  $enabled = isset($enabled_languages[$language]) ? $enabled_languages[$language] : 0;
  return $enabled === 0;
}