The Intl.DisplayNames
object enables the consistent translation of language,
region and script display names.
Static methods
staticsupportedLocalesOf(locales:String, ?options:DisplayNamesSupportedLocalesOfOptions):Array<String>
staticsupportedLocalesOf(locales:Array<String>, ?options:DisplayNamesSupportedLocalesOfOptions):Array<String>
Returns an array containing those of the provided locales that are supported in display names without having to fall back to the runtime's default locale.
Constructor
new(?locales:String, ?options:DisplayNamesOptions)
new(?locales:Array<String>, ?options:DisplayNamesOptions)
Creates a new Intl.DisplayNames
object.
Methods
of(code:String):String
Receives a code and returns a string based on the locale and options
provided when instantiating Intl.DisplayNames
.
resolvedOptions():DisplayNamesResolvedOptions
Returns a new object with properties reflecting the locale and formatting options computed during initialization of the object.