--- title: NavigatorLanguage slug: Web/API/NavigatorLanguage tags: - API - HTML-DOM - NeedsTranslation - No Interface - Reference - TopicStub translation_of: Web/API/NavigatorLanguage ---

{{APIRef("HTML DOM")}}

NavigatorLanguage contains methods and properties related to the language of the navigator.

There is no object of type NavigatorLanguage, but other interfaces, like {{domxref("Navigator")}} or {{domxref("WorkerNavigator")}}, implement it.

Properties

The NavigatorLanguage interface doesn't inherit any property.

{{domxref("NavigatorLanguage.language")}} {{readonlyInline}}
Returns a {{domxref("DOMString")}} representing the preferred language of the user, usually the language of the browser UI. The null value is returned when this is unknown.
{{domxref("NavigatorLanguage.languages")}} {{readonlyInline}}
Returns an array of {{domxref("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
{{SpecName('HTML WHATWG', '#navigatorlanguage', 'NavigatorLanguage')}} {{Spec2('HTML WHATWG')}} Since the {{SpecName('HTML5 W3C')}} snapshot, the languages property has been added.
{{SpecName('HTML5 W3C', '#navigatorlanguage', 'NavigatorLanguage')}} {{Spec2('HTML5 W3C')}} Initial specification; snapshot of  an early version{{SpecName('HTML WHATWG')}}.

Browser compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}}
languages 37 {{CompatGeckoDesktop("32")}} {{CompatNo}} 24 {{CompatNo}}
on {{domxref("WorkerNavigator")}} {{CompatUnknown}} {{CompatGeckoDesktop("35")}} {{CompatNo}} {{CompatUnknown}} {{CompatNo}}
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}}
languages {{CompatUnknown}} {{CompatUnknown}}  {{CompatGeckoMobile("32")}} {{CompatNo}} {{CompatUnknown}} {{CompatNo}}
on {{domxref("WorkerNavigator")}} {{CompatUnknown}} {{CompatUnknown}} {{CompatGeckoMobile("35")}} {{CompatNo}} {{CompatUnknown}} {{CompatNo}}

See also