function hook_language_delete

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

4 functions implement hook_language_delete()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

block_language_delete in drupal/core/modules/block/block.module
Implements hook_language_delete().
language_language_delete in drupal/core/modules/language/language.module
Implements hook_language_delete().
locale_language_delete in drupal/core/modules/locale/locale.module
Implements hook_language_delete().
node_language_delete in drupal/core/modules/node/node.module
Implements hook_language_delete().
1 invocation of hook_language_delete()
language_delete in drupal/core/modules/language/language.module
Delete a language.

File

drupal/core/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();
}