function hook_language_presave

React to a language about to be added or updated in the system.

Parameters

$language: A language object.

Related topics

1 invocation of hook_language_presave()
language_save in drupal/core/modules/language/language.module
API function to add or update a language.

File

drupal/core/modules/language/language.api.php, line 19
Hooks provided by the Language module.

Code

function hook_language_presave($language) {
  if ($language->default) {

    // React to a new default language.
    example_new_default_language($language);
  }
}