You are here

function calendar_systems_get_active_lang in Calendar Systems 5

Same name and namespace in other branches
  1. 6.3 calendar_systems.module \calendar_systems_get_active_lang()
  2. 6 calendar_systems.module \calendar_systems_get_active_lang()
1 call to calendar_systems_get_active_lang()
calendar_systems_get_calendar_instance in ./calendar_systems.module

File

./calendar_systems.module, line 15

Code

function calendar_systems_get_active_lang() {
  if (module_exists('path')) {
    $pathAlias = drupal_get_path_alias($_GET['q']);
  }
  else {
    $pathAlias = $_GET['q'];
  }
  if (preg_match("/(\\/|^)(fa)(\\/|\$)/i", $pathAlias)) {
    return 'fa';
  }
  else {
    return 'en';
  }
}