hansihe
Icu - Fast and lightweight Localization for Elixir
Icu is a localization library for Elixir. It wraps the icu4x library by the Unicode consortium (with a Rustler NIF).
Some highlights:
- Ships with every locale in the
basic,moderateandmodernCLDR coverage levels by default. - Fast compile times. Downloads precompiled NIF by default.
- Simple to use, minimal configuration, no backends.
- Implements:
- BCP-47 handling
- Number
- List
- Temporal (DateTime, NaiveDateTime, Date, Time)
- Relative Temporal
- Currency formatting
- Backed by the proven
icu4xlibrary - Already used heavily in production
- Otherwise a very boring library

Some caveats:
- Limited set of functionality, not as comprehensive as the
cldrset of Elixir libraries.- Contributions are very welcome if you need more
icu4xfunctionality exposed.
- Contributions are very welcome if you need more
- Uses a NIF, which may not be something you want.
- NIF library is relatively heavy, it contains a lot of locale data.
icu4xis already optimized rather heavily for embedded use cases, you have loads of options to reduce library size by selecting only the data you require. Contributions are very welcome to make theicuelixir library more customizable for embedded users as well!
Most Liked
kip
The upcoming Localize (ex_cldr 3.0) will compile much much faster. The current bottleneck is the compiler phase that deals with multiple functions heads. Its gets very very slow when there are many many function heads - and thats relied upon heavily in the current implementation. The new implementation is runtime only (no compile time config), uses persistent_term for data storage (not compiled artifacts - with a couple of exceptions).
hansihe
That’s great news! That will certainly eliminate the biggest pain we have currently. I would be happy if this library became unnecessary for us ![]()
let me know of other pain points you found too, so I can try and mitigate them in the future
Thanks, will do!
Schultzer
I think both libraries have value, would be cool to have benchmarks of both so people have more data points for which and when they should choose one or the other. But also both suffer the same pain that not all data is exposed and need continuous maintenance and contributions.
Popular in Announcing
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex









