function ConfigurableLanguageManager::getStandardLanguageListWithoutConfigured
Same name in other branches
- 9 core/modules/language/src/ConfigurableLanguageManager.php \Drupal\language\ConfigurableLanguageManager::getStandardLanguageListWithoutConfigured()
- 10 core/modules/language/src/ConfigurableLanguageManager.php \Drupal\language\ConfigurableLanguageManager::getStandardLanguageListWithoutConfigured()
- 11.x core/modules/language/src/ConfigurableLanguageManager.php \Drupal\language\ConfigurableLanguageManager::getStandardLanguageListWithoutConfigured()
Overrides ConfigurableLanguageManagerInterface::getStandardLanguageListWithoutConfigured
File
-
core/
modules/ language/ src/ ConfigurableLanguageManager.php, line 465
Class
- ConfigurableLanguageManager
- Overrides default LanguageManager to provide configured languages.
Namespace
Drupal\languageCode
public function getStandardLanguageListWithoutConfigured() {
$languages = $this->getLanguages();
$predefined = $this->getStandardLanguageList();
foreach ($predefined as $key => $value) {
if (isset($languages[$key])) {
unset($predefined[$key]);
continue;
}
$predefined[$key] = new TranslatableMarkup($value[0]);
}
natcasesort($predefined);
return $predefined;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.