Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Intl.getCanonicalLocales()

この記事は編集レビューを必要としています。ぜひご協力ください

Intl.getCanonicalLocales() メソッドは、標準ロケール名を含む配列を返します。重複は省略され、要素は構造的に有効な言語タグか検証されます。

構文

Intl.getCanonicalLocales(locales)

パラメーター

locales
標準ロケール名を取得するための String 値リスト。

Intl.getCanonicalLocales("EN-US"); // ["en-US"]
Intl.getCanonicalLocales(["EN-US", "Fr"]); // ["en-US", "fr"]

Intl.getCanonicalLocales("EN_US"); 
// RangeError:'EN_US' is not a structurally valid language tag

仕様

仕様 状態 コメント
ECMAScript Internationalization API 4.0 (ECMA-402)
Intl.getCanonicalLocales の定義
ドラフト 初期定義。

ブラウザ実装状況

機能 Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
基本サポート 未サポート 48 (48) 未サポート 未サポート 未サポート
機能 Android Chrome for Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
基本サポート 未サポート 未サポート 未サポート 未サポート 未サポート 未サポート

関連項目

ドキュメントのタグと貢献者

 このページの貢献者: YuichiNukiyama
 最終更新者: YuichiNukiyama,