aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/javascript/reference/global_objects/intl/locale/textinfo/index.md
blob: 025b3e37707e0a9502902d8ac63966a33c428d3d (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
---
title: Intl.Locale.prototype.textInfo
slug: Web/JavaScript/Reference/Global_Objects/Intl/Locale/textInfo
browser-compat: javascript.builtins.Intl.Locale.textInfo
---
{{JSRef}}

La propriété **`Intl.Locale.prototype.textInfo`** est un accesseur qui renvoie le sens d'écriture horizontal : `ltr` (pour gauche à droite) ou `rtl` (pour droite à gauche) pour la locale portée par l'instance de `Locale`.

## Description

Renvoie les informations de texte associées à la locale courante selon [les éléments de disposition UTS 35](https://www.unicode.org/reports/tr35/tr35-general.html#Layout_Elements).

## Exemples

### Obtenir les informations textuelles d'une locale

```js
let ar = new Intl.Locale("ar");
console.log(ar.textInfo); // affiche { direction: "rtl" }
console.log(ar.textInfo.direction); // affiche "rtl"
```

```js
let es = new Intl.Locale("es");
console.log(es.textInfo); // affiche { direction: "ltr" }
console.log(es.textInfo.direction); // affiche "ltr"
```

## Spécifications

{{Specifications}}

## Compatibilité des navigateurs

{{Compat}}

## Voir aussi

- [`Intl.Locale`](/fr/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale)