NavigatorLanguage

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

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 version HTML Living Standard.

Browser compatibility

DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
NavigatorLanguageChrome Full support 1Edge Full support 12Firefox Full support 1IE Full support 11Opera Full support 4Safari Full support 1WebView Android Full support 1Chrome Android Full support 18Firefox Android Full support 4Opera Android Full support 10.1Safari iOS Full support 1Samsung Internet Android Full support 1.0
languageChrome Full support 1
Notes
Full support 1
Notes
Notes Returns the browser UI language, not the value of the Accept-Language HTTP header.
Edge Full support 12
Notes
Full support 12
Notes
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
Notes
Full support 1
Notes
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
Notes
Full support 11
Notes
Notes Closest available (non-standard) properties are userLanguage and browserLanguage.
Opera Full support 4Safari Full support 1WebView Android Full support 1
Notes
Full support 1
Notes
Notes Returns the browser UI language, not the value of the Accept-Language HTTP header.
Chrome Android Full support 18
Notes
Full support 18
Notes
Notes Returns the browser UI language, not the value of the Accept-Language HTTP header.
Firefox Android Full support 4Opera Android Full support 10.1Safari iOS Full support 1Samsung Internet Android Full support 1.0
Notes
Full support 1.0
Notes
Notes Returns the browser UI language, not the value of the Accept-Language HTTP header.
languages
Experimental
Chrome Full support 32
Notes
Full support 32
Notes
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
Notes
Full support 12
Notes
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
Notes
Full support 32
Notes
Notes In Firefox, the navigator.languages property's value is taken from the intl.accept_languages preference.
IE Full support 11
Notes
Full support 11
Notes
Notes Closest available (non-standard) properties are userLanguage and browserLanguage.
Opera Full support 24Safari Full support 11WebView Android Full support 4.4.3
Notes
Full support 4.4.3
Notes
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
Notes
Full support 32
Notes
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
Notes
Full support 4
Notes
Notes In Firefox, the navigator.languages property's value is taken from the intl.accept_languages preference.
Opera Android Full support 24Safari iOS Full support YesSamsung Internet Android Full support 2.0
Notes
Full support 2.0
Notes
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 workersChrome ? Edge ? Firefox Full support 35IE No support NoOpera ? Safari No support NoWebView Android ? Chrome Android ? Firefox Android Full support 35Opera Android ? Safari iOS No support NoSamsung 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.