Cldr.Currency.pluralize

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

pluralize(number, currency, backend, options \\ [])

View Source

Specs

pluralize(pos_integer(), code(), Cldr.backend(), Keyword.t()) ::
  {:ok, String.t()} | {:error, {module(), String.t()}}

Returns the appropriate currency display name for the currency, based on the plural rules in effect for the locale.

Arguments

Options

  • :locale is any locale returned by Cldr.Locale.new!/2. The default is <backend>.get_locale/1

Returns

  • {:ok, plural_string} or

  • {:error, {exception, message}}

Examples

iex> Cldr.Currency.pluralize 1, :USD, MyApp.Cldr
{:ok, "US dollar"}

iex> Cldr.Currency.pluralize 3, :USD, MyApp.Cldr
{:ok, "US dollars"}

iex> Cldr.Currency.pluralize 12, :USD, MyApp.Cldr, locale: "zh"
{:ok, "美元"}

iex> Cldr.Currency.pluralize 12, :USD, MyApp.Cldr, locale: "fr"
{:ok, "dollars des États-Unis"}

iex> Cldr.Currency.pluralize 1, :USD, MyApp.Cldr, locale: "fr"
{:ok, "dollar des États-Unis"}