diff --git a/core/lib/Drupal/Core/Language/LanguageManager.php b/core/lib/Drupal/Core/Language/LanguageManager.php index 6c419a8..127e24a 100644 --- a/core/lib/Drupal/Core/Language/LanguageManager.php +++ b/core/lib/Drupal/Core/Language/LanguageManager.php @@ -123,16 +123,14 @@ public function getDefaultLanguage() { * {@inheritdoc} */ public function getLanguages($flags = LanguageInterface::STATE_CONFIGURABLE) { - // No language module, so use the default language only. + // If this language manager is used, there are no configured languages. + // The default language and locked languages comprise the full language + // list. $default = $this->getDefaultLanguage(); $languages = array($default->getId() => $default); - - // Add the special languages, they will be filtered later if needed. $languages += $this->getDefaultLockedLanguages($default->getWeight()); - // Filter the full list of languages based on the value of the $all flag. By - // default we remove the locked languages, but the caller may request for - // those languages to be added as well. + // Filter the full list of languages based on the value of $flags. return $this->filterLanguages($languages, $flags); }