Bug #23367
closedHTTP_ACCEPT_LANGUAGE not respected in login screen
0%
Description
The HTTP_ACCEPT_LANGUAGE header is not respected in login screen in one case :
If the first preferred language is 'en' or 'en.*', and there is a second preferred language that is set, the second preferred language is always chosen. The 'default' language should be chosen in this case.
That is due to the fact that t3lib_cs::getPreferredClientLanguage(), used for defining the login screen's language, uses t3lib_cs::$charSetArray to have the list of supported languages. As there is no 'en' entry in this array, it is considered as a non-supported language.
Having only 'en' as preferred language works because the function default is, indeed, the value 'default', when no valid language is found.
The proposed patch only adds 'en' => '' to the t3lib_cs::$charSetArray variable.
I haven't tested but I guess 4.3 branch and trunk are also affected.
(issue imported from #M15449)
Files