Intl.Locale.prototype.textInfo
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
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.
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
Specification |
---|
Intl Locale Info Proposal # sec-Intl.Locale.prototype.getTextInfo |
Compatibilité des navigateurs
Report problems with this compatibility data on GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
getTextInfo |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- See implementation notes.
- Uses a non-standard name.
- Has more compatibility info.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.