Chris@0: languageManager) { Chris@0: $default = $this->languageManager->getDefaultLanguage(); Chris@0: $config = $this->config->get('language.negotiation')->get('url'); Chris@0: $prefix = ($config['source'] == LanguageNegotiationUrl::CONFIG_PATH_PREFIX); Chris@0: Chris@0: // If the default language is not configured to convey language Chris@0: // information, a missing URL language information indicates that URL Chris@0: // language should be the default one, otherwise we fall back to an Chris@0: // already detected language. Chris@0: if (($prefix && empty($config['prefixes'][$default->getId()])) || (!$prefix && empty($config['domains'][$default->getId()]))) { Chris@0: $langcode = $default->getId(); Chris@0: } Chris@0: else { Chris@0: $langcode = $this->languageManager->getCurrentLanguage()->getId(); Chris@0: } Chris@0: } Chris@0: Chris@0: return $langcode; Chris@0: } Chris@0: Chris@0: }