1 locale.api.php hook_locale_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/locale/locale.api.php, line 18
Hooks provided by the Locale module.

Code

function hook_locale_language_presave($language) {
  if ($language->default) {
    // React to a new default language.
    example_new_default_language($language);
  }
}