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. The null 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
Browser compatibility
| Desktop | Mobile |
|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | Android webview | Chrome for Android | Firefox for Android | Opera for Android | Safari on iOS | Samsung Internet |
|---|
NavigatorLanguage | Chrome
Full support
1 | Edge
Full support
12 | Firefox
Full support
1 | IE
Full support
11 | Opera
Full support
4 | Safari
Full support
1 | WebView Android
Full support
1 | Chrome Android
Full support
18 | Firefox Android
Full support
4 | Opera Android
Full support
10.1 | Safari iOS
Full support
1 | Samsung Internet Android
Full support
1.0 |
|---|
language | Chrome
Full support
1-
Full support
1
- Notes Returns the browser UI language, not the value of the
Accept-Language HTTP header.
| Edge
Full support
12-
Full support
12
- Notes In Chromium versions of Edge, this returns the browser UI language, not the value of the
Accept-Language HTTP header.
| Firefox
Full support
1-
Full support
1
- Notes Prior to Firefox 4, this property's value was also part of the user agent string, as reported by
navigator.userAgent. Starting in Firefox 5, this property's value is based on the value of the Accept-Language HTTP header.
| IE
Full support
11-
Full support
11
- Notes Closest available (non-standard) properties are
userLanguage and browserLanguage.
| Opera
Full support
4 | Safari
Full support
1 | WebView Android
Full support
1-
Full support
1
- Notes Returns the browser UI language, not the value of the
Accept-Language HTTP header.
| Chrome Android
Full support
18-
Full support
18
- Notes Returns the browser UI language, not the value of the
Accept-Language HTTP header.
| Firefox Android
Full support
4 | Opera Android
Full support
10.1 | Safari iOS
Full support
1 | Samsung Internet Android
Full support
1.0-
Full support
1.0
- Notes Returns the browser UI language, not the value of the
Accept-Language HTTP header.
|
|---|
languages | Chrome
Full support
32-
Full support
32
- Notes In Chrome,
navigator.language is the language of the browser UI, and is not guaranteed to be equal to navigator.languages[0].
| Edge
Full support
12-
Full support
12
- Notes In Chromium versions of Edge, this returns the browser UI language, not the value of the
Accept-Language HTTP header.
| Firefox
Full support
32-
Full support
32
- Notes In Firefox, the
navigator.languages property's value is taken from the intl.accept_languages preference.
| IE
Full support
11-
Full support
11
- Notes Closest available (non-standard) properties are
userLanguage and browserLanguage.
| Opera
Full support
24 | Safari
Full support
11 | WebView Android
Full support
4.4.3-
Full support
4.4.3
- Notes In Chrome,
navigator.language is the language of the browser UI, and is not guaranteed to be equal to navigator.languages[0].
| Chrome Android
Full support
32-
Full support
32
- Notes In Chrome,
navigator.language is the language of the browser UI, and is not guaranteed to be equal to navigator.languages[0].
| Firefox Android
Full support
4-
Full support
4
- Notes In Firefox, the
navigator.languages property's value is taken from the intl.accept_languages preference.
| Opera Android
Full support
24 | Safari iOS
Full support
Yes | Samsung Internet Android
Full support
2.0-
Full support
2.0
- Notes In Samsung Internet,
navigator.language is the language of the browser UI, and is not guaranteed to be equal to navigator.languages[0].
|
|---|
| Available in workers | Chrome
?
| Edge
?
| Firefox
Full support
35 | IE
No support
No | Opera
?
| Safari
No support
No | WebView Android
?
| Chrome Android
?
| Firefox Android
Full support
35 | Opera Android
?
| Safari iOS
No support
No | 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