This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2017.
The resolvedOptions() method of Intl.Collator instances returns a new object with properties reflecting the options computed during initialization of this Collator object.
const numberDe = new Intl.NumberFormat("de-DE");
const numberAr = new Intl.NumberFormat("ar");
console.log(numberDe.resolvedOptions().numberingSystem);
// Expected output: "latn"
console.log(numberAr.resolvedOptions().numberingSystem);
// Expected output: "arab"
resolvedOptions()
None.
A new object with properties reflecting the options computed during the initialization of this Collator object. The object has the following properties, in the order they are listed:
localeThe BCP 47 language tag for the locale actually used, determined by the locale negotiation process. Only the co, kn, and kf Unicode extension keys, if requested and supported, may be included in the output.
usageThe value provided for this property in the options argument, with default filled in as needed. It is either "sort" or "search". The default is "sort".
sensitivityThe value provided for this property in the options argument, with default filled in as needed. It is either "base", "accent", "case", or "variant". The default is "variant" for usage "sort"; it's locale dependent for usage "search".
ignorePunctuationThe value provided for this property in the options argument, with default filled in as needed. It is a boolean. The default is true for Thai (th) and false for all other languages.
collationThe value provided for this property in the options argument, or using the Unicode extension key "co", with default filled in as needed. It is a supported collation type for this locale. The default is "default".
numericThe value provided for this property in the options argument, or using the Unicode extension key "kn", with default filled in as needed. It is a boolean. The default is false. If the implementation does not support this Unicode extension key, this property is omitted.
caseFirstThe value provided for this property in the options argument, or using the Unicode extension key "kf", with default filled in as needed. It is either "upper", "lower", or "false". The default is "false". If the implementation does not support this Unicode extension key, this property is omitted.
const de = new Intl.Collator("de", { sensitivity: "base" });
const usedOptions = de.resolvedOptions();
usedOptions.locale; // "de"
usedOptions.usage; // "sort"
usedOptions.sensitivity; // "base"
usedOptions.ignorePunctuation; // false
usedOptions.collation; // "default"
usedOptions.numeric; // false
| Desktop | Mobile | Server | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | Bun | Deno | Node.js | |
resolvedOptions |
24 | 12 | 29 | 15 | 10 | 25 | 56 | 14 | 10 | 1.5 | 4.4 | 10 | 1.0.0 | 1.8 | 0.12.0Before version 13.0.0, only the locale data foren-US is available by default. See the Collator() constructor for more details. |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/resolvedOptions