# Number and Currency Localization and Formatting


[](https://hex.pm/packages/ex_cldr_numbers)
[](https://github.com/kipcole9/cldr_numbers/blob/master/LICENSE)
## Introduction and Getting Started
[ex_cldr_numbers](https://hex.pm/packages/ex_cldr_numbers) is an addon library application for [ex_cldr](https://hex.pm/packages/ex_cldr) that provides localization and formatting for numbers and currencies.
The primary api is `Cldr.Number.to_string/2`. The following examples demonstrate:
```elixir
iex> Cldr.Number.to_string 12345
{:ok, "12,345"}
iex> Cldr.Number.to_string 12345, locale: "fr"
{:ok, "12 345"}
iex> Cldr.Number.to_string 12345, locale: "fr", currency: "USD"
{:ok, "12 345,00 $US"}
iex> Cldr.Number.to_string 12345, format: "#E0"
{:ok, "1.2345E4"}
```
For help in `iex`:
```elixir
iex> h Cldr.Date.to_string
iex> h Cldr.Time.to_string
iex> h Cldr.DateTime.to_string
iex> h Cldr.DateTime.Relative.to_string
```
## Documentation
Primary documentation is available on [as part of the ex_cldr documentation on hex](https://hexdocs.pm/ex_cldr/3_number_formats.html)
## Known restrictions and limitations
## Installation
Note that [ex_cldr_numbers](https://hex.pm/packages/ex_cldr_numbers) requires Elixir 1.5 or later.
Add `ex_cldr_numbers` as a dependency to your `mix` project:
defp deps do
[
{:ex_cldr_numbers, "~> 0.1.0"}
]
end
then retrieve `ex_cldr_numbers` from [hex](https://hex.pm/packages/ex_cldr_numbers):
mix deps.get
mix deps.compile