NavigatorLanguage
contains methods and properties related to the language of the navigator.
There is no object of type NavigatorLanguage
, but other interfaces, like Navigator
or WorkerNavigator
, implement it.
The NavigatorLanguage
interface doesn't inherit any property.
NavigatorLanguage.language
Read only
DOMString
representing the preferred language of the user, usually the language of the browser UI. The null
value is returned when this is unknown.NavigatorLanguage.languages
Read only
DOMString
representing the languages known to the user, by order of preference.The NavigatorLanguage
interface neither implements, nor inherit any method.
Specification | Status | Comment |
---|---|---|
HTML Living Standard The definition of 'NavigatorLanguage' in that specification. | Living Standard | Since the HTML5 snapshot, the languages property has been added. |
HTML5 The definition of 'NavigatorLanguage' in that specification. | Recommendation | Initial specification; snapshot of an early versionHTML Living Standard. |
Desktop | ||||||
---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
Basic support | Yes | ? | Yes | Yes | Yes | Yes |
Support on WorkerNavigator
|
? | ? | 35 | No | ? | No |
language |
Yes
|
Yes | 1
|
11
|
Yes | Yes |
languages
|
32
|
Yes | 32
|
11
|
24 | 11 |
Mobile | |||||||
---|---|---|---|---|---|---|---|
Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
Basic support | Yes | Yes | ? | Yes | Yes | Yes | ? |
Support on WorkerNavigator
|
? | ? | ? | 35 | ? | No | ? |
language |
Yes
|
Yes
|
Yes | 4 | Yes | Yes | ? |
languages
|
4.4.3
|
32
|
Yes | 4
|
24 | Yes | ? |
Navigator
interface that implements it.
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/navigatorLanguage