1 language.api.php hook_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/language/language.api.php, line 51
Hooks provided by the Language module.

Code

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