You are here

function hook_admin_language_switch_alter in Administration Language 7

Alters the decision of admin language switch to change language.

Be sure that your module is initialized on early bootstrap phase to execute this hook. This hook can be called during the bootstrap phase. Be careful to not use functions such as current_path() which are not yet available.

Parameters

bool $switch: Indicates whether language should be switched to the admin language or not.

1 invocation of hook_admin_language_switch_alter()
_admin_language_switch_language in ./admin_language.module
Determine whether the language needs to be switched on the current path.

File

./admin_language.api.php, line 18
This file describes hooks provided by module admin_language.

Code

function hook_admin_language_switch_alter(&$switch) {
  global $theme;
  if (_admin_language_match_path($_GET['q'], 'node/add/*') && $theme == 'my_front_theme_name') {
    $switch = FALSE;
  }
}