LocaleConfigManager::hasTranslation

public LocaleConfigManager::hasTranslation($name, $langcode)

Checks whether a language has configuration translation.

Parameters

string $name: Configuration name.

string $langcode: A language code.

Return value

bool A boolean indicating if a language has configuration translations.

File

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

Class

LocaleConfigManager
Manages configuration supported in part by interface translation.

Namespace

Drupal\locale

Code

public function hasTranslation($name, $langcode) {
  $translation = $this->languageManager->getLanguageConfigOverride($langcode, $name);
  return !$translation->isNew();
}
doc_Drupal
2016-10-29 09:23:54
Comments
Leave a Comment

Please login to continue.