The Javascript Intl.NumberFormat.supportedLocalesOf()
method returns supported options by locale.
Intl.NumberFormat.supportedLocalesOf(locales[, options])
Parameter | Optional | Meaning |
---|---|---|
locales | Required | A string with a language tag |
options | Optional | An object that may have the following property: localeMatcher The locale matching algorithm to use.Possible values are "lookup" and "best fit" Default to "best fit". |
Using supportedLocalesOf()
var locales = ['ban', 'id-u-co-pinyin', 'de-ID']; var options = { localeMatcher: 'lookup' }; console.log(Intl.NumberFormat.supportedLocalesOf(locales, options).join(', '));