The PluralRules object is a constructor for objects that enable plural sensitive formatting and plural language rules.

Documentation PluralRules by Mozilla Contributors, licensed under CC-BY-SA 2.5.

Static methods

staticsupportedLocalesOf(locales:String, ?options:Null<PluralRulesSupportedLocalesOfOptions>):Array<String>

staticsupportedLocalesOf(locales:Array<String>, ?options:Null<PluralRulesSupportedLocalesOfOptions>):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<PluralRulesOptions>)

new(?locales:Array<String>, ?options:Null<PluralRulesOptions>)

Methods

resolvedOptions():PluralRulesResolvedOptions

Returns a new object with properties reflecting the locale and collation options computed during initialization of the object.

select(number:Int):String

Returns a String indicating which plurar rule to use for locale-aware formatting.