LocaleConfigManager::deleteLanguageTranslations

public LocaleConfigManager::deleteLanguageTranslations($langcode)

Deletes configuration for language.

Parameters

string $langcode: Language code to delete.

File

core/modules/locale/src/LocaleConfigManager.php, line 339

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;
}
doc_Drupal
2016-10-29 09:23:53
Comments
Leave a Comment

Please login to continue.