SoftBank.Cldr.Number.Cardinal.pluralize

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

pluralize(number, locale_name, substitutions)

View Source

Specs

pluralize(
  Cldr.Math.number_or_decimal() | %Range{first: term(), last: term()},
  Cldr.LanguageTag.t() | Cldr.Locale.locale_name(),
  %{}
) :: any()

Pluralize a number using cardinal plural rules and a substition map.

Arguments

See also SoftBank.Cldr.Number.Cardinal.Cardinal.plural_rule/3.

Examples

iex> SoftBank.Cldr.Number.Cardinal.pluralize 1, "en", %{one: "one"}
"one"

iex> SoftBank.Cldr.Number.Cardinal.pluralize 2, "en", %{one: "one"}
nil

iex> SoftBank.Cldr.Number.Cardinal.pluralize 2, "en", %{one: "one", two: "two", other: "other"}
"other"

iex> SoftBank.Cldr.Number.Cardinal.pluralize 22, "en", %{one: "one", two: "two", other: "other"}
"other"

iex> SoftBank.Cldr.Number.Cardinal.pluralize Decimal.new(1), "en", %{one: "one"}
"one"

iex> SoftBank.Cldr.Number.Cardinal.pluralize Decimal.new(2), "en", %{one: "one"}
nil

iex> SoftBank.Cldr.Number.Cardinal.pluralize Decimal.new(2), "en", %{one: "one", two: "two"}
nil

iex> SoftBank.Cldr.Number.Cardinal.pluralize 1..10, "ar", %{one: "one", few: "few", other: "other"}
"few"

iex> SoftBank.Cldr.Number.Cardinal.pluralize 1..10, "en", %{one: "one", few: "few", other: "other"}
"other"