API reference / @localizer/translate / plural
Function: plural() experimental
plural<
T
>(value
,map
):Localizable
Defined in: plural.ts:114
Plural translation function.
Determines the appropriate translation for a given numeric value based on the provided plural translation map and the locale's pluralization rules.
Type Parameters
Type Parameter | Description |
---|---|
T extends number | The type of numeric values that the function can handle. |
Parameters
Parameter | Type | Description |
---|---|---|
value | T | The numeric value to be pluralized. |
map | PluralTranslationMap <T > | The translation map containing plural categories and values. |
Returns
The localized pluralized value.
Throws
If no "other" plural category is defined in the map.