Browser language detection

Bug #872045 reported by Nicolas Hatier
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
AuthPuppy
New
Undecided
Unassigned

Bug Description

Authpuppy does not detect browser language correctly when said browser language is a sublanguage (fr_CA, for instance) and the parent one (fr) isn't in the accept_language list. AuthPuppy should default to the parent language but instead defaults to the Authpuppy default (english).

A proposed patch is to add in lib/vendor/symfony/lib/request/sfWebRequest.class.php, line 441:

439: }
440: }
441:
441: $pos = strpos($lang, '_');
441: if ($pos !== FALSE)
441: {
441: $this->languages[] = $lang;
441: $lang = substr($lang, 0, $pos);
441: }
441:
442: $this->languages[] = $lang;
442: }

Note: this patch is only tested in my specific configuration, but I don't see where there could be shortcomings.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.