Closed
Bug 526301
Opened 16 years ago
Closed 16 years ago
[FyFx] Language detection only takes the first component of Accept Language header
Categories
(Webtools Graveyard :: Five Years of Firefox, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: stas, Unassigned)
References
Details
(Keywords: l12y)
Attachments
(1 file)
|
6.81 KB,
patch
|
Details | Diff | Splinter Review |
The language detection in http://viewvc.svn.mozilla.org/vc/projects/fyfx/trunk/index.php?revision=54729&view=markup only takes into account the first component of Accept Language header.
$lang = explode("-", $iso_lang[0]);
We should support falling back to other locales than en-US. We could use an existing solution, e.g. from mozilla.com:
http://viewvc.svn.mozilla.org/vc/projects/mozilla.com/trunk/includes/prefetch.php?revision=54633&view=markup#l79
http://viewvc.svn.mozilla.org/vc/projects/mozilla.com/trunk/includes/langconfig.inc.php?view=markup
| Reporter | ||
Comment 1•16 years ago
|
||
| Reporter | ||
Comment 2•16 years ago
|
||
This patch uses the Mozilla.com code to correctly detect the locale. It also fixes bug 526305 by registering the locale for gettext using the correct system name (e.g. "fa" gets registered as "fa_IR.utf8").
I'm going to land this asap to allow localizers to preview and test their work.
| Reporter | ||
Comment 3•16 years ago
|
||
Landed in r55073. Some further tweaks to the list of supported locales <http://viewvc.svn.mozilla.org/vc/projects/fyfx/trunk/components/locales.inc.php?view=markup&pathrev=55073> might be needed.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•