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 GitHub
desktopmobileserver
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Deno
Node.js
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.

関連情報