JavaScript

Intl.Locale.prototype.language プロパティ


編集:2023.01.10 by T.A.

[Edge]。→

Intl.Locale の言語(¶言語コード)を文字列で返します。

構文
Intl.Locale.language
Intl.Locale Intl.Locale

文字列。→言語タグ

DA=new Intl.Locale('ja-JP');  //日本語の日本国。
D=DA.language;  //=[string]:ja
DA=new Intl.Locale('ja-JP-u-hc-h11');  //日本語の日本国で時間制。
D=DA.language;  //=[string]:ja
DA=new Intl.Locale('ja-Hani-JP');  //日本語の漢字の日本国。
D=DA.language;  //=[string]:ja

Intl.Locale()


テスト