You are here

public function LocaleConfigManager::deleteLanguageTranslations in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 332
Contains \Drupal\locale\LocaleConfigManager.

Class

LocaleConfigManager
Manages configuration supported in part by interface translation.

Namespace

Drupal\locale

Code

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;
}