[TYPO3-core] RFC #15449: Bug: HTTP_ACCEPT_LANGUAGE not always respected in login screen

Alexandre Gravel-Raymond a.gravel-raymond at alienor.net
Fri Aug 13 12:21:07 CEST 2010


This is an SVN patch request.

Type: Bugfix

Bugtracker references: http://bugs.typo3.org/view.php?id=15449

Branches: 4.4 (trunk not tested but may be affected)

Problem:
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.

Solution:
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.

Alexandre Gravel-Raymond
Developer, Alienor.net
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: class.t3lib_cs.php.patch
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100813/36dfee07/attachment.txt>


More information about the TYPO3-team-core mailing list