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 versionHTML Living Standard.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic supportChrome Full support YesEdge ? Firefox Full support YesIE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesEdge Mobile ? Firefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android ?
Support on WorkerNavigatorChrome ? Edge ? Firefox Full support 35IE No support NoOpera ? Safari No support NoWebView Android ? Chrome Android ? Edge Mobile ? Firefox Android Full support 35Opera Android ? Safari iOS No support NoSamsung Internet Android ?
languageChrome Full support Yes
Notes
Full support Yes
Notes
Notes Returns the browser UI language, not the value of the Accept-Language HTTP header.
Edge Full support YesFirefox 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.
Full support 5
Notes
Notes Starting in Firefox 5.0 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 YesSafari Full support YesWebView Android Full support Yes
Notes
Full support Yes
Notes
Notes Returns the browser UI language, not the value of the Accept-Language HTTP header.
Chrome Android Full support Yes
Notes
Full support Yes
Notes
Notes Returns the browser UI language, not the value of the Accept-Language HTTP header.
Edge Mobile Full support YesFirefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android ?
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 YesFirefox 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].
Edge Mobile Full support YesFirefox 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 ?

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.

Document Tags and Contributors

Contributors to this page: fscholz, teoli, realityking
Last updated by: fscholz,