Cldr.Currency.currency_from_locale
You're seeing just the function
currency_from_locale, go back to Cldr.Currency module for more information.
Returns the effective currency for a given locale
Arguments
localeis aCldr.LanguageTagstruct returned byCldr.Locale.new!/2
Returns
- A ISO 4217 currency code as an upcased atom
Examples
iex> {:ok, locale} = Cldr.validate_locale "en", MyApp.Cldr
iex> Cldr.Currency.currency_from_locale locale
:USD
iex> {:ok, locale} = Cldr.validate_locale "en-AU", MyApp.Cldr
iex> Cldr.Currency.currency_from_locale locale
:AUD
iex> Cldr.Currency.currency_from_locale "en-GB"
:GBP
Returns the effective currency for a given locale
Arguments
localeis any valid locale name returned byCldr.known_locale_names/1backendis any module that includesuse Cldrand therefore is aCldrbackend module. The default isCldr.default_backend/0
Returns
- A ISO 4217 currency code as an upcased atom
Examples
iex> Cldr.Currency.currency_from_locale "fr-CH", MyApp.Cldr
:CHF
iex> Cldr.Currency.currency_from_locale "fr-CH-u-cu-INR", MyApp.Cldr
:INR