1.12.x language.api.php hook_language_delete($language)
1.10.x language.api.php hook_language_delete($language)
1.11.x language.api.php hook_language_delete($language)
1.7.x 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

modules/language/language.api.php, line 52
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();
}