[BUGFIX] Use correct HTML lang attribute for BE login 67/44967/2
authorMarkus Klein <markus.klein@typo3.org>
Thu, 26 Nov 2015 21:59:28 +0000 (22:59 +0100)
committerMarkus Klein <markus.klein@typo3.org>
Thu, 26 Nov 2015 22:49:21 +0000 (23:49 +0100)
Next to the language object also the PageRenderer needs to be informed
about the chosen language, based on the browser's accepted languages.

Resolves: #71861
Releases: master
Change-Id: I6b8e25189cd1c33ab50fc5b5373aace4a78d41cd
Reviewed-on: https://review.typo3.org/44967
Tested-by: Jérémie Roulin <jeremie@hemmer.ch>
Reviewed-by: Jérémie Roulin <jeremie@hemmer.ch>
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Tested-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/backend/Classes/Controller/LoginController.php

index e122f1c..b408ddb 100644 (file)
@@ -106,6 +106,7 @@ class LoginController
         // initialize $this->getLanguageService() again with $preferredBrowserLanguage
         if ($preferredBrowserLanguage !== 'default' && empty($this->getBackendUserAuthentication()->user['uid'])) {
             $this->getLanguageService()->init($preferredBrowserLanguage);
+            GeneralUtility::makeInstance(PageRenderer::class)->setLanguage($preferredBrowserLanguage);
         }
 
         $this->getLanguageService()->includeLLFile('EXT:lang/locallang_login.xlf');