Browser language detection
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/
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.