navigator.language

Navigator オブジェクト language 属性 (DOM)

仕様書

関連

[16] 似たようなものに navigator.systemLanguagenavigator.userLanguage があります。

歴史

[20] JavaScript 1.2 で追加されました。

[11] FirefoxSafariChromeOpera が実装しています。 WinIE7 は実装していないっぽいです。

[12] 日本語版の場合、 Safarija-JP を返しますが、 それ以外は ja を返します。

[13] NC4jp を返したらしいですが、未確認です。

[14] Opera利用者界面の言語設定と Accept-Language: の設定が一体化していますが、 利用者界面の言語設定だけから値が決まるようです。

[15] Chrome利用者界面の言語設定が反映されるようです。

[21] Safari Developer FAQ ( 版) <http://developer.apple.com/jp/internet/safari/faq.html#anchor1>

GeckoベースのブラウザであるSafariはnavigator.languageプロパティをサポートし、Internet Explorer 5はnavigator.userLanguageをサポートしています。

[17] Mozilla-gumi Forum [One Topic All View / Re[1]: MacOSX Safariでmozilla-japanにアクセスすると英語版のダウンロードになりませんか? / Page: 0] (Mozilla-gumi 著, 版) <http://forum.mozilla.gr.jp/cbbs.cgi?mode=al2&namber=11993&rev=&&KLOG=79#12007>

btm の投稿 :2004/11/12(Fri) 00:57:14

実際に試してみました。
Safari:

navigator.language : en
navigator.userLanguage : undefined
navigator.systemLanguage : undefined

Firefox 1.0 日本語版:

navigator.language : ja-JPM
navigator.userLanguage : undefined
navigator.systemLanguage : undefined

[117] Web Applications 1.0 r7606 Document navigator.language. (Also, add a Workers topic you can subscribe to. Right now, it's a subset of the DOM APIs topic.) ( ( 版)) <http://html5.org/tools/web-apps-tracker?from=7605&to=7606>

[118] Web Applications 1.0 r8231 Try to improve the fingerprinting-avoidance advice for navigator.language ( ( 版)) <http://html5.org/tools/web-apps-tracker?from=8230&to=8231>

[18] Web Applications 1.0 r7746 Default navigator.language to 'en' instead of null. ( ( 版)) <http://html5.org/tools/web-apps-tracker?from=7745&to=7746>

[19] 780953 – Add language change event ( ( 版)) <https://bugzilla.mozilla.org/show_bug.cgi?id=780953>

[1] Fix #881: Make NavigatorLanguage#language non-nullable · whatwg/html@d5ccd65 ( 版) <https://github.com/whatwg/html/commit/d5ccd6595271916e8f947d9bf0412288a985f7ae>

[2] 55366 – Don't reveal UI language to site/page -- Change navigator.language to use Accept-Language instead of the UI language ( ()) <https://bugzilla.mozilla.org/show_bug.cgi?id=55366>

[3] NavigatorLanguage.language - Web APIs | MDN () <https://developer.mozilla.org/en-US/docs/Web/API/NavigatorLanguage/language>

[4] navigator.languagetoLocaleString言語が異なることがあるようです。

[5] 288670 - Use intl.accept_languages to choose the locale for a package if the current locale is unavailable ( ()) <https://bugzilla.mozilla.org/show_bug.cgi?id=288670>