The Intl.ListFormat
object enables language-sensitive list formatting.
Static methods
staticsupportedLocalesOf(locales:String, ?options:Null<ListFormatSupportedLocalesOfOptions>):Array<String>
staticsupportedLocalesOf(locales:Array<String>, ?options:Null<ListFormatSupportedLocalesOfOptions>):Array<String>
Returns an array containing those of the provided locales that are supported without having to fall back to the runtime's default locale.
Constructor
new(?locales:String, ?options:Null<ListFormatOptions>)
new(?locales:Array<String>, ?options:Null<ListFormatOptions>)
Creates a new Intl.ListFormat
object.
Methods
format(?list:Array<String>):String
Returns a language-specific formatted string representing the elements of the list.
formatToParts(?list:Array<String>):Array<ListFormatPart>
Returns an array of objects representing the different components that can be used to format a list of values in a locale-aware fashion.