Web/API/NavigatorLanguage

From Get docs


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 StandardThe definition of 'NavigatorLanguage' in that specification. Living Standard Since the HTML5 snapshot, the languages property has been added.
HTML5The definition of 'NavigatorLanguage' in that specification. Recommendation Initial specification; snapshot of an early version HTML Living Standard.

Browser compatibility

Update compatibility data on GitHub

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

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 4

Safari

Full support 1

WebView 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 4

Opera Android

Full support 10.1

Safari iOS

Full support 1

Samsung 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 24

Safari

Full support 11

WebView 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 24

Safari iOS

Full support Yes

Samsung 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 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