Cldr.Currency.strings_for_currency
You're seeing just the function
strings_for_currency
, go back to Cldr.Currency module for more information.
Specs
strings_for_currency( t(), Cldr.LanguageTag.t() | Cldr.Locale.locale_name(), Cldr.backend() ) :: [String.t()]
Returns the strings associated with a currency in a given locale.
Arguments
currency
is an ISO4217 currency codelocale
is any valid locale name returned byCldr.known_locale_names/1
or aCldr.LanguageTag
struct returned byCldr.Locale.new!/2
.backend
is any module that includesuse Cldr
and therefore is aCldr
backend module
Returns
A list of strings or
{:error, {exception, reason}}
Example
iex> Cldr.Currency.strings_for_currency(:AUD, "en", MyApp.Cldr) |> Enum.sort
["a$", "aud", "australian dollar", "australian dollars"]
iex> Cldr.Currency.strings_for_currency(:AUD, "de", MyApp.Cldr) |> Enum.sort
["au$", "aud", "australische dollar", "australischer dollar"]
iex> Cldr.Currency.strings_for_currency(:AUD, "zh", MyApp.Cldr) |> Enum.sort
["au$", "aud", "澳大利亚元"]