Intl.Locale.prototype.textInfo
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Intl.Locale.prototype.textInfo
プロパティは、関連する Locale
に対して ltr
(左書き)または rtl
(右書き)で示される文字の並び順を返すアクセサープロパティです。
解説
UTS 35's Layouts Elements で定義されているロケールのデータに結び付けた Locale
情報を返します。
例
テキスト情報の取得
指定された Locale
で対応している書字方向を返します。
js
let ar = new Intl.Locale("ar");
console.log(ar.textInfo); // logs { direction: "rtl" }
console.log(ar.textInfo.direction); // logs "rtl"
js
let es = new Intl.Locale("es");
console.log(es.textInfo); // logs { direction: "ltr" }
console.log(es.textInfo.direction); // logs "ltr"
仕様書
Specification |
---|
Intl Locale Info Proposal # sec-Intl.Locale.prototype.getTextInfo |
ブラウザーの互換性
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.