The Intl.Locale.prototype.textInfo
property is an accessor property which returns the ordering of characters indicated by either ltr
(left-to-right) or by rtl
(right-to-left) for the associated Locale
.
The Intl.Locale.prototype.textInfo
property is an accessor property which returns the ordering of characters indicated by either ltr
(left-to-right) or by rtl
(right-to-left) for the associated Locale
.
Returns the Locale
information associated with the Locale data specified in UTS 35's Layouts Elements.
Return the supported text directions for a given Locale
.
const ar = new Intl.Locale("ar"); console.log(ar.textInfo); // logs { direction: "rtl" } console.log(ar.textInfo.direction); // logs "rtl"
const es = new Intl.Locale("es"); console.log(es.textInfo); // logs { direction: "ltr" } console.log(es.textInfo.direction); // logs "ltr"
Desktop | Mobile | Server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | Deno | Node.js | |
textInfo |
99 |
99 |
No |
No |
85 |
15.4 |
99 |
99 |
No |
No |
15.4 |
18.0 |
No |
No |
© 2005–2022 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/textInfo