function LocaleConfigManager::deleteLanguageTranslations
Same name in other branches
- 8.9.x core/modules/locale/src/LocaleConfigManager.php \Drupal\locale\LocaleConfigManager::deleteLanguageTranslations()
- 10 core/modules/locale/src/LocaleConfigManager.php \Drupal\locale\LocaleConfigManager::deleteLanguageTranslations()
- 11.x core/modules/locale/src/LocaleConfigManager.php \Drupal\locale\LocaleConfigManager::deleteLanguageTranslations()
Deletes configuration for language.
Parameters
string $langcode: Language code to delete.
File
-
core/
modules/ locale/ src/ LocaleConfigManager.php, line 337
Class
- LocaleConfigManager
- Manages configuration supported in part by interface translation.
Namespace
Drupal\localeCode
public function deleteLanguageTranslations($langcode) {
$this->isUpdatingFromLocale = TRUE;
$storage = $this->languageManager
->getLanguageConfigOverrideStorage($langcode);
foreach ($storage->listAll() as $name) {
$this->languageManager
->getLanguageConfigOverride($langcode, $name)
->delete();
}
$this->isUpdatingFromLocale = FALSE;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.