This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
This was was cloned from bug 17479 as part of operation convergence. Originally filed: 2012-06-13 10:39:00 +0000 Original reporter: Anne <annevk@annevk.nl> ================================================================================ #0 Anne 2012-06-13 10:39:29 +0000 -------------------------------------------------------------------------------- All browsers support it. We should document that somewhere and somewhere might as well be where the Navigator object is defined. Maybe "en" should be used as value when the user wants to reduce fingerprinting. Though given all the other exposed fingerprinting data this might not be worth mentioning. ================================================================================ #1 Simon Pieters 2012-06-13 10:59:34 +0000 -------------------------------------------------------------------------------- $ grep -aPhc "navigator\.language" web200904 3354 $ grep -aPhc "navigator\.language" stevef-all 53 ================================================================================ #2 Simon Pieters 2012-06-13 11:15:20 +0000 -------------------------------------------------------------------------------- I quickly looked through the stevef-all (which is from http://www.paciellogroup.com/blog/2012/04/html5-accessibility-chops-data-for-the-masses/ ) matches. Most or all of them also use navigator.userLanguage or navigator.browserLanguage or navigator.systemLanguage if navigator.language is not defined. The common usage of this API seems to be for tracking, although there are probably some that use it for localization purposes as well. ================================================================================
I didn't spec it before because interop sucks, according to my notes in the spec: <!-- v2: also, could expose languages: <dt><dfn title="dom-navigator-browserLanguage"><code>browserLanguage</code></dfn></dt> <!- - Opera and IE only - -> <dd><p>Must return either null or a language tag representing the language the browser uses in its interface.</p></dd> <dt><dfn title="dom-navigator-userLanguage"><code>userLanguage</code></dfn></dt> <!- - Opera and IE only - -> <dt><dfn title="dom-navigator-language"><code>language</code></dfn></dt> <!- - Opera, Safari, and Mozilla only - -> <dd><p>Must return either null or a language tag representing the user's preferred language.</p></dd> -->
Added language. Hopefully that's enough.
I doubt returning a non-string value is compatible enough. I'd suggest we make that the empty string or simply "en".
Ok.
Checked in as WHATWG revision r7746. Check-in comment: Default navigator.language to 'en' instead of null. http://html5.org/tools/web-apps-tracker?from=7745&to=7746