1 locale.api.php hook_locale_language_delete($language)

Allow modules to react before the deletion of a language.

Parameters

$language: The language object of the language that is about to be deleted.

Related topics

File

core/modules/locale/locale.api.php, line 52
Hooks provided by the Locale module.

Code

function hook_locale_language_delete($language) {
  // On nodes with this language, unset the language
  db_update('node')
    ->fields(array('language' => ''))
    ->condition('language', $language->langcode)
    ->execute();
}