Cldr.Currency.currency_from_locale

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

currency_from_locale(locale)

View Source

Returns the effective currency for a given locale

Arguments

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
Link to this function

currency_from_locale(locale, backend \\ default_backend())

View Source

Returns the effective currency for a given locale

Arguments

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