public function ConfigurableLanguageManager::getStandardLanguageListWithoutConfigured in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/language/src/ConfigurableLanguageManager.php \Drupal\language\ConfigurableLanguageManager::getStandardLanguageListWithoutConfigured()
Returns the standard language list excluding already configured languages.
Return value
array A list of standard language names keyed by langcode.
Overrides ConfigurableLanguageManagerInterface::getStandardLanguageListWithoutConfigured
File
- core/
modules/ language/ src/ ConfigurableLanguageManager.php, line 465 - Contains \Drupal\language\ConfigurableLanguageManager.
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]);
}
asort($predefined);
return $predefined;
}