CLDR plural rules, compiled from the bundled priv/cldr/plurals.json
(cardinal: 1 file, 2 files) and priv/cldr/ordinals.json (ordinal: 1st,
2nd), CLDR 49, Unicode License v3.
iex> VerifiedTranslations.Plural.category("fi", 1)
"one"
iex> VerifiedTranslations.Plural.category("ru", 22)
"few"
iex> VerifiedTranslations.Plural.category("en", 22, :ordinal)
"two"
iex> VerifiedTranslations.Plural.categories("ar")
["zero", "one", "two", "few", "many", "other"]Counts may be integers, floats, Decimals or numeric strings ("1.50"
keeps its two visible fraction digits, which matters in some languages).
Summary
Functions
CLDR plural categories of a CLDR language, in canonical order. type is
:cardinal (1 file, 2 files) or :ordinal (1st, 2nd).
Plural category of count for a CLDR language (see language/1).
The CLDR language whose rules apply to locale ("pt_PT" -> "pt-PT",
"fi_FI" -> "fi"), or nil when CLDR has no rules for it.
Functions
CLDR plural categories of a CLDR language, in canonical order. type is
:cardinal (1 file, 2 files) or :ordinal (1st, 2nd).
Plural category of count for a CLDR language (see language/1).
The CLDR language whose rules apply to locale ("pt_PT" -> "pt-PT",
"fi_FI" -> "fi"), or nil when CLDR has no rules for it.