hansihe

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).

Docs

Some highlights:

  • Ships with every locale in the basic, moderate and modern CLDR 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 icu4x library
  • Already used heavily in production
  • Otherwise a very boring library :slight_smile:

Some caveats:

  • Limited set of functionality, not as comprehensive as the cldr set of Elixir libraries.
    • Contributions are very welcome if you need more icu4x functionality exposed.
  • Uses a NIF, which may not be something you want.
  • NIF library is relatively heavy, it contains a lot of locale data.
    • icu4x is 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 the icu elixir library more customizable for embedded users as well!

https://github.com/hansihe/icu_ex

Most Liked

kip

kip

ex_cldr Core Team

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

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 :slight_smile:

let me know of other pain points you found too, so I can try and mitigate them in the future

Thanks, will do!

Schultzer

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.

Where Next?

Popular in Announcing Top

Qqwy
Hello everyone, I wrote a small library today called MapDiff. It returns a map listing the (smallest amount of) changes to get from map...
New
OvermindDL1
I created a new library (rather I pulled out a couple files from my big project), it manages an operating system PID file for the BEAM. ...
New
kelvinst
Hey everyone! Well, we made this lib a while ago and now we decided to finally go out and public with it! It’s a tool for creating and m...
New
treble37
Just looking for a little feedback on a tiny helper library I built - Sometimes I find the need to convert maps with atom keys to maps w...
New
pkrawat1
Hey guyz We at @aviabird are working on a payment library in elixir/phoenix. We are targeting March 2018 to add 56 Gateways to it. Have...
New
wfgilman
I’ve cleaned up and open sourced three financial libraries I was using for my company. They are bindings for the APIs of these three comp...
New
wojtekmach
Hey everyone! Req is an HTTP client for Elixir that I’ve been working on for quite some time. There is already a lot of HTTP clients out...
New

Other popular topics Top

nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New

We're in Beta

About us Mission Statement