PluralRules
t
RESCRIPT
type tlocaleType
RESCRIPT
type localeType = [#cardinal | #ordinal]options
RESCRIPT
type options = {
localeMatcher?: Intl_Common.localeMatcher,
\"type"?: localeType,
minimumIntegerDigits?: Intl_Common.oneTo21,
minimumFractionDigits?: Intl_Common.zeroTo20,
maximumFractionDigits?: Intl_Common.zeroTo20,
minimumSignificantDigits?: Intl_Common.oneTo21,
maximumSignificantDigits?: Intl_Common.oneTo21,
}pluralCategories
RESCRIPT
type pluralCategories = [
| #few
| #many
| #one
| #other
| #two
| #zero
]resolvedOptions
RESCRIPT
type resolvedOptions = {
locale: string,
pluralCategories: array<pluralCategories>,
\"type": localeType,
minimumIntegerDigits?: Intl_Common.oneTo21,
minimumFractionDigits?: Intl_Common.zeroTo20,
maximumFractionDigits?: Intl_Common.zeroTo20,
minimumSignificantDigits?: Intl_Common.oneTo21,
maximumSignificantDigits?: Intl_Common.oneTo21,
}supportedLocalesOptions
RESCRIPT
type supportedLocalesOptions = {
localeMatcher: Intl_Common.localeMatcher,
}make
RESCRIPT
let make: (~locales: array<string>=?, ~options: options=?) => tsupportedLocalesOf
RESCRIPT
let supportedLocalesOf: (array<string>, ~options: supportedLocalesOptions=?) => tresolvedOptions
RESCRIPT
let resolvedOptions: t => resolvedOptionsrule
RESCRIPT
type rule = [#few | #many | #one | #other | #two | #zero]select
RESCRIPT
let select: (t, float) => ruleselectInt
RESCRIPT
let selectInt: (t, int) => ruleselectBigInt
RESCRIPT
let selectBigInt: (t, bigint) => ruleselectRange
RESCRIPT
let selectRange: (t, ~start: float, ~end: float) => ruleselectRangeInt
RESCRIPT
let selectRangeInt: (t, ~start: int, ~end: int) => ruleselectRangeBigInt
RESCRIPT
let selectRangeBigInt: (t, ~start: bigint, ~end: bigint) => ruleignore
RESCRIPT
let ignore: t => unitignore(pluralRules) ignores the provided pluralRules and returns unit.
This helper is useful when you want to discard a value (for example, the result of an operation with side effects) without having to store or process it further.