--- title: Intl.Collator.prototype.resolvedOptions() slug: Web/JavaScript/Reference/Global_Objects/Intl/Collator/resolvedOptions tags: - Collator - Internationalization - Intl - JavaScript - Method - Prototype translation_of: Web/JavaScript/Reference/Global_Objects/Intl/Collator/resolvedOptions ---
Intl.Collator.prototype.resolvedOptions()
メソッドは、この {{jsxref("Collator")}} オブジェクトの初期化時に計算されたロケールと照合オプションを反映したプロパティを持つ新しいオブジェクトを返します。
collator.resolvedOptions()
この {{jsxref("Collator")}} オブジェクトの初期化時に計算されたロケールと照合オプションを反映したプロパティを持つ新しいオブジェクトです。
返されるオブジェクトには以下のプロパティがあります。
locale
locale
に含まれます。usage
sensitivity
ignorePunctuation
options
引数の同名のプロパティで提供された値、または既定値が入ります。collation
locale
が対応している場合は、 Unicode 拡張キー "co"
を使用して要求された値、そうでなければ "default"
です。numeric
caseFirst
options
引数の同名のプロパティ、または Unicode 拡張キーの "kn"
および "kf"
で要求された値、または既定値が入ります。実装がこれらのプロパティに対応していない場合は、省略されます。var de = new Intl.Collator('de', { sensitivity: 'base' }) var usedOptions = de.resolvedOptions(); usedOptions.locale; // "de" usedOptions.usage; // "sort" usedOptions.sensitivity; // "base" usedOptions.ignorePunctuation; // false usedOptions.collation; // "default" usedOptions.numeric; // false
仕様書 |
---|
{{SpecName('ES Int Draft', '#sec-intl.collator.prototype.resolvedoptions', 'Intl.Collator.prototype.resolvedOptions')}} |
{{Compat("javascript.builtins.Intl.Collator.resolvedOptions")}}