aboutsummaryrefslogtreecommitdiff
path: root/files/de/web/api/l10n.language.direction/index.html
blob: c469794d542cb6442d3981e348eaef6360cb36a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---
title: L10n.language.direction
slug: Web/API/L10n.language.direction
translation_of: Archive/B2G_OS/API/L10n/language/direction
---
<div class="syntaxbox">{{ non-standard_header() }}</div>

<div class="syntaxbox"> </div>

<div class="summary">
<p><span class="seoSummary">The <code>language.direction</code> property returns the direction (<code>ltr</code> or <code>rtl</code>) of the currently active language.</span></p>
</div>

<h2 id="Syntax">Syntax</h2>

<pre class="syntaxbox">var languageCode = navigator.mozL10n.language.direction;</pre>

<h2 id="Value">Value</h2>

<p>Returns the direction of the currently active language (<code>ltr</code> or <code>rtl</code>).</p>

<h2 id="Example">Example</h2>

<pre class="brush: js">navigator.mozL10n.ready(function() {
  console.log('The current language's direction is ' + navigator.mozL10n.language.direction);
});
</pre>

<h2 id="Specification" name="Specification">Specification</h2>

<p>Not part of any specification.</p>

<h2 id="See_also">See also</h2>

<ul>
 <li>{{domxref("L10n")}}</li>
 <li>{{domxref("L10n.language.code")}}</li>
</ul>

<section id="Quick_Links">
<ol>
 <li data-default-state="open"><strong><a href="#">Guides</a></strong>

  <ol>
   <li><a href="/en-US/Apps/Build/Localization">Localization</a></li>
  </ol>
 </li>
 <li data-default-state="open"><strong><a href="#">Properties</a></strong>
  <ol>
   <li>{{ domxref("L10n.language.code") }}</li>
   <li>{{ domxref("L10n.language.direction") }}</li>
   <li>{{ domxref("L10n.readyState") }}</li>
  </ol>
 </li>
 <li data-default-state="open"><strong><a href="#">Methods</a></strong>
  <ol>
   <li>{{ domxref("L10n.get") }}</li>
   <li>{{ domxref("L10n.ready") }}</li>
   <li>{{ domxref("L10n.once") }}</li>
  </ol>
 </li>
</ol>
</section>