NavigatorLanguage

  • Revision slug: Web/API/NavigatorLanguage
  • Revision title: NavigatorLanguage
  • Revision id: 458493
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment

Revision Content

The NavigatorLanguage interface contains methods and properties related to the language of the navigator

There is no object of type NavigatorLanguage, but some, like {{domxref("Navigator")}} implements it.

Properties

The NavigatorLanguage interface doesn't inherit any property.

{{domxref("NavigatorLanguage.language")}}
Returns a {{domxref("DOMString")}} representing the language version of the browser. The null value is returned when this is unknown.

Methods

The NavigatorLanguage interface neither implements, nor inherit any method.

Specifications

Specification Status Comment
{{SpecName('HTML WHATWG', '#navigatorlanguage', 'NavigatorLanguage')}} {{Spec2('HTML WHATWG')}} No change from {{Spec2('HTML5 W3C')}}
{{SpecName('HTML5 W3C', '#navigatorlanguage', 'NavigatorLanguage')}} {{Spec2('HTML5 W3C')}} Initial specification.

Browser compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}}
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}}

See also

  • The {{domxref("Navigator")}} interface that implements it.

Revision Source

<p>The <code><strong>NavigatorLanguage</strong></code> interface contains methods and properties related to the language of the navigator</p>
<p>There is no object of type <code>NavigatorLanguage</code>, but some, like {{domxref("Navigator")}} implements it.</p>
<h2 id="Properties">Properties</h2>
<p><em>The <code>NavigatorLanguage</code></em><em> interface doesn't inherit any property.</em></p>
<dl>
  <dt>
    {{domxref("NavigatorLanguage.language")}}</dt>
  <dd>
    Returns a {{domxref("DOMString")}} representing the language version of the browser. The <code>null</code> value is returned when this is unknown.</dd>
</dl>
<h2 id="Methods">Methods</h2>
<p><em>The </em><em><code>NavigatorLanguage</code></em><em> interface neither implements, nor inherit any method.</em></p>
<h2 id="Specifications">Specifications</h2>
<table class="standard-table">
  <thead>
    <tr>
      <th scope="col">Specification</th>
      <th scope="col">Status</th>
      <th scope="col">Comment</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>{{SpecName('HTML WHATWG', '#navigatorlanguage', 'NavigatorLanguage')}}</td>
      <td>{{Spec2('HTML WHATWG')}}</td>
      <td>No change from {{Spec2('HTML5 W3C')}}</td>
    </tr>
    <tr>
      <td>{{SpecName('HTML5 W3C', '#navigatorlanguage', 'NavigatorLanguage')}}</td>
      <td>{{Spec2('HTML5 W3C')}}</td>
      <td>Initial specification.</td>
    </tr>
  </tbody>
</table>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<div id="compat-desktop">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Chrome</th>
        <th>Firefox (Gecko)</th>
        <th>Internet Explorer</th>
        <th>Opera</th>
        <th>Safari</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
      </tr>
    </tbody>
  </table>
</div>
<div id="compat-mobile">
  <table class="compat-table">
    <tbody>
      <tr>
        <th>Feature</th>
        <th>Android</th>
        <th>Chrome for Android</th>
        <th>Firefox Mobile (Gecko)</th>
        <th>IE Mobile</th>
        <th>Opera Mobile</th>
        <th>Safari Mobile</th>
      </tr>
      <tr>
        <td>Basic support</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
        <td>{{CompatVersionUnknown}}</td>
      </tr>
    </tbody>
  </table>
</div>
<h2 id="See_also">See also</h2>
<ul>
  <li>The {{domxref("Navigator")}} interface that implements it.</li>
</ul>
Revert to this revision