MyApp.Cldr.Number.System.number_system_for

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

number_system_for(locale, system_name)

View Source

Specs

number_system_for(
  Cldr.Locale.locale_name() | Cldr.LanguageTag.t(),
  Cldr.Number.System.system_name()
) :: {:ok, [atom()]} | {:error, {module(), String.t()}}

Returns the actual number system from a number system type.

This function will decode a number system type into the actual number system. If the number system provided can't be decoded it is returned as is.

Examples

iex> Cldr.Number.System.number_system_for "th", :latn, TestBackend.Cldr
{:ok, %{digits: "0123456789", type: :numeric}}

iex> Cldr.Number.System.number_system_for "en", :default, TestBackend.Cldr
{:ok, %{digits: "0123456789", type: :numeric}}

iex> Cldr.Number.System.number_system_for "he", :traditional, TestBackend.Cldr
{:ok, %{rules: "hebrew", type: :algorithmic}}

iex> Cldr.Number.System.number_system_for "en", :finance, TestBackend.Cldr
{
  :error,
  {Cldr.UnknownNumberSystemError,
    "The number system :finance is unknown for the locale named \"en\". Valid number systems are %{default: :latn, native: :latn}"}
}

iex> Cldr.Number.System.number_system_for "en", :native, TestBackend.Cldr
{:ok, %{digits: "0123456789", type: :numeric}}