Cldr.Currency.display_name

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

display_name(currency, options \\ [])

View Source

Specs

display_name(t() | code(), Keyword.t()) ::
  {:ok, String.t()} | {:error, {module(), String.t()}}

Return the display name for a currency.

The display name is useful for UI uses, for example in menus. The display name is typically capitalized for stand-alone use where as the display name returned by Cldr.Currency.pluralize/4 is typically lower-cased for use within sentences.

Arguments

Options

Returns

  • {:ok, display_name}

  • or {:error, {exception, reason}}

Examples

iex> Cldr.Currency.display_name :AUD, backend: MyApp.Cldr
{:ok, "Australian Dollar"}

iex> Cldr.Currency.display_name "AUD", backend: MyApp.Cldr, locale: "fr"
{:ok, "dollar australien"}

iex> Cldr.Currency.display_name "EUR", backend: MyApp.Cldr, locale: "de"
{:ok, "Euro"}

iex> Cldr.Currency.display_name "ZZZ", backend: MyApp.Cldr
{:error, {Cldr.UnknownCurrencyError, "The currency \"ZZZ\" is invalid"}}