Firefox navigator.language always return en-US

Bug #117915 reported by Paco Avila
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Mozilla Firefox
In Progress
Unknown
firefox-3.0 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: firefox

My locale is es_ES.UTF-8, my list of preferred langs is es-es, es, en-us, en. But this Javascript code returns en-US:

   alert("navigator.language: "+navigator.language);

Why? It should return es-ES (or es-es).

TESTCASE:
Steps to Reproduce:
1.Set your default language to something different than the locale
2a. access navigator.language javascript property
2b. or access http://gemal.dk/browserspy/language.html

Actual Results:
you get your locale

Expected Results:
you should get the default language

Revision history for this message
Caspar Clemens Mierau (leitmedium) wrote :

This bug can be easily confirmed by using:
http://gemal.dk/browserspy/language.html
after changing firefox accepted languages to non en_US.

This bug has been reported before upstream but was also reported to be fixed. See:
https://bugzilla.mozilla.org/show_bug.cgi?id=285267

Please check if a patch for this bug needs to be synched from upstream.

Revision history for this message
Paco Avila (monkiki) wrote :

I've diggin in this error and if i go to "about:config", the property "general.useragent.locale" is set to "en-US". But my locale is es_ES.UTF-8, so why is this property set to en-US by default?

Changed in firefox:
assignee: nobody → mozilla-bugs
Changed in firefox:
status: Unknown → Rejected
Revision history for this message
Epper (m-epper) wrote :

I can confirm this strange behaviour

Firefox/2.0.0.4 - Ubuntu-feisty

Revision history for this message
John Vivirito (gnomefreak) wrote :

Would like some more testing done on this bug with ubuntus firefox and upstream firefox. I will see if we can get upstream bug reopened once we have more testing done with both firefoxs stated above. Tagging mt-needtester

Changed in firefox:
status: Unconfirmed → Needs Info
description: updated
Changed in firefox:
status: Rejected → Confirmed
Revision history for this message
Jean-Philippe (skateinmars) wrote :

I can confirm this bug on feisty and firefox 2.0.0.5 from the ubuntu repositories.
My locale is fr-FR but the general.useragent.locale property is en-US.

The bug is also reopened upstream.

Changed in firefox:
status: Confirmed → In Progress
Revision history for this message
John Vivirito (gnomefreak) wrote :

This is fixed in 3.0 as i recall, not sure why upstream bug didnt mrak bug as resolved. Firefox 2.0 will never see this fix.

Changed in firefox (Ubuntu):
assignee: mozilla-bugs → nobody
Changed in firefox-3.0 (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Reopening, appeared back in jaunty. See bug #353924.

Changed in firefox-3.0 (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
John Vivirito (gnomefreak) wrote :

Marked as a duplicate for bug #353924

Revision history for this message
John Vivirito (gnomefreak) wrote :

Once other bug is fixed this will be fixed.

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.