# `Localize.Number.Symbol`
[🔗](https://github.com/elixir-localize/localize/blob/v0.39.0/lib/localize/number/symbol.ex#L1)

Functions to manage the number symbol definitions for a locale
and number system.

Number symbols define the characters used for decimal separators,
grouping separators, percent signs, and other formatting elements.
Each locale may define symbols for one or more number systems
(e.g., `:latn`, `:arab`, `:thai`).

Symbol data is retrieved at runtime from locale data via the
configured locale provider.

# `t`

```elixir
@type t() :: %Localize.Number.Symbol{
  approximately_sign: String.t(),
  decimal: String.t() | map(),
  exponential: String.t(),
  group: String.t() | map(),
  infinity: String.t(),
  list: String.t(),
  minus_sign: String.t(),
  nan: String.t(),
  per_mille: String.t(),
  percent_sign: String.t(),
  plus_sign: String.t(),
  superscripting_exponent: String.t(),
  time_separator: String.t()
}
```

# `number_symbols_for`

```elixir
@spec number_symbols_for(Localize.LanguageTag.t() | atom() | String.t()) ::
  {:ok, map()} | {:error, Exception.t()}
```

Returns a map of `Localize.Number.Symbol.t()` structs of the
number symbols for each number system of a locale.

### Arguments

* `locale` is a locale identifier atom, string, or a
  `t:Localize.LanguageTag.t/0` struct.

### Returns

* `{:ok, symbols_map}` where `symbols_map` is a map of
  `%{system_name => Localize.Number.Symbol.t()}`.

* `{:error, exception}` if the locale data cannot be loaded.

# `number_symbols_for`

```elixir
@spec number_symbols_for(
  Localize.LanguageTag.t() | atom() | String.t(),
  atom() | String.t()
) ::
  {:ok, t()} | {:error, Exception.t()}
```

Returns the number symbols for a specific locale and number system.

### Arguments

* `locale` is a locale identifier atom, string, or a
  `t:Localize.LanguageTag.t/0` struct.

* `number_system` is a number system name atom or string
  (e.g., `:latn`, `:arab`).

### Returns

* `{:ok, Localize.Number.Symbol.t()}` with the symbols for the
  requested number system.

* `{:error, exception}` if the locale data cannot be loaded or
  no symbols exist for the number system.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
