1 language.api.php hook_language_presave($language)

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

Parameters

$language: A language object.

Related topics

File

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);
  }
}