Cldr.Number.PluralRule.plural_type
You're seeing just the function
plural_type
, go back to Cldr.Number.PluralRule module for more information.
Returns the plural type for a given number.
Arguments
number
is an integer, float or Decimal numberbackend
is any module that includesuse Cldr
and therefore is aCldr
backend module. The default isCldr.default_backend!/0
.options
is a keyword list of options
Options
locale
is any valid locale name returned byCldr.known_locale_names/1
or aCldr.LanguageTag
struct returned byCldr.Locale.new!/2
, The default isCldr.get_locale/0
.backend
is any module that includesuse Cldr
and therefore is aCldr
backend module. The default isCldr.default_backend!/0
. This option allows the backend to be specified as an argument or an option.type
is eitherCardinal
orOrdinal
. The default isCardinal
.
Examples
iex> Cldr.Number.PluralRule.plural_type(123)
:other
iex> Cldr.Number.PluralRule.plural_type(123, type: Ordinal)
:few
iex> Cldr.Number.PluralRule.plural_type(123, type: Cardinal)
:other
iex> Cldr.Number.PluralRule.plural_type(2, locale: "de")
:other