Closed Bug 299522 Opened 19 years ago Closed 12 years ago

navigator.language property form doesn't follow the documentation

Categories

(Core :: DOM: Core & HTML, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: ap, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X; ru-ru) AppleWebKit/312.1 (KHTML, like Gecko) Safari/312
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3

The navigator.language property is "en-US" for U.S. English, while it is explicitly documented to be two-
letter: <http://www.mozilla.org/docs/dom/domref/dom_window_ref42.html>.


Reproducible: Always

Steps to Reproduce:
1. Go to http://gemal.dk/browserspy/language.html
2. Look at the Language variable.



Expected Results:  
Either documentation or implementation seems to be wrong, I'm not sure which.

Anyhow, it is very important to distinguish between language and locale codes (e.g., "zh-Hans" vs. "zh-
CN").

See also: bug 285267 (navigator.language js property doesn't reflect browser default language).
Status: UNCONFIRMED → NEW
Ever confirmed: true
I suspect in this case the documentation is what is wrong...  We're pretty definitely using the locale pref for the "language" here.
Assignee: general → nobody
QA Contact: ian → general
I think the documentation reflects enough of the current reality to be able to close this bug. WFM.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.