locale_configurable_language_delete(ConfigurableLanguageInterface $language)
Implements hook_ENTITY_TYPE_delete() for 'configurable_language'.
function locale_configurable_language_delete(ConfigurableLanguageInterface $language) { // Remove translations. \Drupal::service('locale.storage')->deleteTranslations(array('language' => $language->id())); // Remove interface translation files. module_load_include('inc', 'locale', 'locale.bulk'); locale_translate_delete_translation_files(array(), array($language->id())); // Remove translated configuration objects. Locale::config()->deleteLanguageTranslations($language->id()); // Changing the language settings impacts the interface: _locale_invalidate_js($language->id()); \Drupal::cache('render')->deleteAll(); // Clear locale translation caches. locale_translation_status_delete_languages(array($language->id())); \Drupal::cache()->delete('locale:' . $language->id()); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!locale!locale.module/function/locale_configurable_language_delete/8.1.x