diff --git a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUrl.php b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUrl.php index fc0d9d4..4718d2a 100644 --- a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUrl.php +++ b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUrl.php @@ -196,7 +196,9 @@ public function processOutbound($path, &$options = array(), Request $request = N * {@inheritdoc} */ public function getLanguageSwitchLinks(Request $request, $type, Url $url) { - $links = array(); + $links = []; + $query = []; + parse_str($request->getQueryString(), $query); foreach ($this->languageManager->getNativeLanguages() as $language) { $links[$language->getId()] = array( @@ -207,6 +209,7 @@ public function getLanguageSwitchLinks(Request $request, $type, Url $url) { 'title' => $language->getName(), 'language' => $language, 'attributes' => array('class' => array('language-link')), + 'query' => $query, ); }