Intl.Locale.prototype.textInfo
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
.
Description
Returns the Locale
information associated with the Locale data specified in UTS 35's Layouts Elements.
Examples
Obtaining text info
Return the supported text directions for a given Locale
.
let ar = new Intl.Locale("ar"); console.log(ar.textInfo); // logs { direction: "rtl" } console.log(ar.textInfo.direction); // logs "rtl"
let es = new Intl.Locale("es"); console.log(es.textInfo); // logs { direction: "ltr" } console.log(es.textInfo.direction); // logs "ltr"
Specifications
No specification data found for javascript.builtins.Intl.Locale.textInfo
.
Check for problems with this page or contribute a missing spec_url
to mdn/browser-compat-data. Also make sure the specification is included in w3c/browser-specs.
Browser compatibility
No compatibility data found for javascript.builtins.Intl.Locale.textInfo
.
Check for problems with this page or contribute missing data to mdn/browser-compat-data.
See also
© 2005–2021 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