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.
Properties
The NavigatorLanguage
interface doesn't inherit any property.
NavigatorLanguage.language
Read only- Returns a
DOMString
representing the preferred language of the user, usually the language of the browser UI. Thenull
value is returned when this is unknown. NavigatorLanguage.languages
Read only- Returns an array of
DOMString
representing the languages known to the user, by order of preference.
Methods
The NavigatorLanguage
interface neither implements, nor inherit any method.
Specifications
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. |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
Desktop | Mobile | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Basic support | Chrome Full support Yes | Edge ? | Firefox Full support Yes | IE Full support Yes | Opera Full support Yes | Safari Full support Yes | WebView Android Full support Yes | Chrome Android Full support Yes | Edge Mobile ? | Firefox Android Full support Yes | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android ? |
Support on WorkerNavigator | Chrome ? | Edge ? | Firefox Full support 35 | IE No support No | Opera ? | Safari No support No | WebView Android ? | Chrome Android ? | Edge Mobile ? | Firefox Android Full support 35 | Opera Android ? | Safari iOS No support No | Samsung Internet Android ? |
language | Chrome
Full support
Yes
| Edge Full support Yes | Firefox
Full support
1
| IE
Full support
11
| Opera Full support Yes | Safari Full support Yes | WebView Android
Full support
Yes
| Chrome Android
Full support
Yes
| Edge Mobile Full support Yes | Firefox Android Full support 4 | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android ? |
languages | Chrome
Full support
32
| Edge Full support Yes | Firefox
Full support
32
| IE
Full support
11
| Opera Full support 24 | Safari Full support 11 | WebView Android
Full support
4.4.3
| Chrome Android
Full support
32
| Edge Mobile Full support Yes | Firefox Android
Full support
4
| Opera Android Full support 24 | Safari iOS Full support Yes | Samsung Internet Android ? |
Legend
- Full support
- Full support
- No support
- No support
- Compatibility unknown
- Compatibility unknown
- Experimental. Expect behavior to change in the future.
- Experimental. Expect behavior to change in the future.
- See implementation notes.
- See implementation notes.
See also
- The
Navigator
interface that implements it.