Cldr.Currency.current_currency_from_locale
You're seeing just the function
current_currency_from_locale
, go back to Cldr.Currency module for more information.
Specs
current_currency_from_locale(Cldr.LanguageTag.t()) :: any()
Returns the current currency from a given locale.
This function does not consider the U
extenion
parameters cu
or rg
. It is recommended to us
Cldr.Currency.currency_from_locale/1
in most
circumstances.
Arguments
locale
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
Examples
iex> Cldr.Currency.current_currency_from_locale "en", MyApp.Cldr
:USD
iex> Cldr.Currency.current_currency_from_locale "en-AU", MyApp.Cldr
:AUD
Specs
current_currency_from_locale(Cldr.Locale.locale_name(), Cldr.backend()) :: code() | nil | {:error, {module(), String.t()}}