Cldr.Number.System.number_system_from_locale

You're seeing just the function number_system_from_locale, go back to Cldr.Number.System module for more information.
Link to this function

number_system_from_locale(locale_name)

View Source

Returns the number system from a language tag or locale name.

Arguments

Returns

  • A number system name as an atom

Examples

iex> {:ok, locale} = MyApp.Cldr.validate_locale("en-US-u-nu-thai")
iex> Cldr.Number.System.number_system_from_locale(locale)
:thai

iex> {:ok, locale} = MyApp.Cldr.validate_locale("en-US")
iex> Cldr.Number.System.number_system_from_locale locale
:latn

iex> Cldr.Number.System.number_system_from_locale("ar")
:arab
Link to this function

number_system_from_locale(locale, backend)

View Source

Specs

number_system_from_locale(
  Cldr.LanguageTag.t() | Cldr.Locale.locale_name(),
  Cldr.backend()
) :: system_name()

Returns the default number system from a language tag or locale name.

Arguments

Returns

  • A number system name as an atom

Examples

iex> Cldr.Number.System.number_system_from_locale "en-US-u-nu-thai", MyApp.Cldr
:thai

iex> Cldr.Number.System.number_system_from_locale "en-US", MyApp.Cldr
:latn