MyApp.Cldr.Number.Cardinal.plural_rule

You're seeing just the function plural_rule, go back to MyApp.Cldr.Number.Cardinal module for more information.
Link to this function

plural_rule(number, locale, rounding \\ Math.default_rounding())

View Source

Specs

plural_rule(
  Cldr.Math.number_or_decimal(),
  Cldr.Locale.locale_name() | Cldr.LanguageTag.t(),
  atom() | pos_integer()
) :: Cldr.Number.PluralRule.plural_type()

Return the plural key for a given number in a given locale

Returns which plural key (:zero, :one, :two, :few, :many or :other) a given number fits into within the context of a given locale.

Note that these key names should not be interpreted literally. For example, the key returned from Cldr.Number.Ordinal.plural_rule(0, "en") is actually :other, not :zero.

This key can then be used to format a number, date, time, unit, list or other content in a plural-sensitive way.

Arguments

Examples

iex> MyApp.Cldr.Number.Cardinal.plural_rule 0, "fr"
:one

iex> MyApp.Cldr.Number.Cardinal.plural_rule 0, "en"
:other