kip

kip

ex_cldr Core Team

I’m a bit excited to announce that Localize and friends are now at release 1.0. Even though it’s a 1.0 release, it stands on 8 years of work on the ex_cldr family so it’s solid. I think it’s a better library family in every way: faster, more functional, easier to adopt, simpler packaging, better tested, more conformant to the applicable standards, better documented.

A small set of the supporting libraries (Liveview Inputs, MCP Server) are not yet at 1.0 - they’ll get there when there’s enough feedback to say they are ready.

The main differences from ex_cldr:

  • Compiles much much faster. Localize compiles in less than 3 seconds on my MacBook Pro M1 Max. Thats an order of magnitude faster at least than ex_cldr - and its batteries included rather than a collection of libraries for the core functions.
  • No backend modules. Locale data is loaded on demand at runtime into :persistent_term rather than generated into compile-time backend modules.
  • Much simpler dependency set. The only transitive dependencies are Decimal and Gettext.
  • No compile-time configuration. Locales can be added, loaded, or downloaded at runtime. Data is distributed as Erlang terms, so no JSON decoder is required.
  • Pluggable locale storage. The default loader downloads locale data on demand; custom loaders and stores are supported for air-gapped or resource-constrained environments.
  • Structured errors. Errors return {:error, Exception.t()} with structured exception data, replacing {:error, {module, message}}.

ex_cldr remains supported and will receive maintenance updates until the end of 2027 but no new CLDR functionality is planned.

Localize is a parallel codebase, not a drop-in replacement: most public function signatures are preserved, but removing the backend argument and changing the error format mean migration requires some code changes. I expect your friendly coding agent can make short work of that.

Core libraries

  • localize 1.0.0 — numbers, currencies, dates and times, units, lists, collation, MessageFormat 2, locale display names, and locale resolution.
  • localize_web 1.0.0 — Phoenix and Plug integration: locale negotiation plugs, localized routing, and HTML form helpers.
  • calendrical 1.0.0 — Gregorian, Coptic, Ethiopic, Japanese, Persian, Islamic, Hebrew, and lunisolar calendars, with composite calendars and calendar-aware formatting.
  • intl 1.0.0 — a shim mirroring the JavaScript Intl API, adapted to idiomatic Elixir conventions.
  • localize_translate 0.2.0 — translated content storage and retrieval. Storage is a behaviour with the default keeping translations in a `jsonb` column. A sibling-table store is also included for cases needing per-locale workflow state, permissions or history.
  • ex_money 6.2.0 — a money type with currency-aware math, and locale-aware formatting and parsing. Updated to be based upon Localize and with several key improvements to the exchange rate system contributed by @Wigny.

Features libraries

  • localize_person_names 1.0.0 — locale-aware personal name formatting per the CLDR person name specification: ordering, given/surname conventions, honorifics, and script-specific display.
  • localize_phone_number 1.0.0 — parsing, validation, and formatting of international phone numbers via Google’s libphonenumber.
  • localize_address 1.0.0 — postal address parsing and formatting for 267 countries and territories, with country-specific field ordering. Based on libpostal.
  • unity 1.0.0 — a unit conversion calculator inspired by the Unix units utility, usable as a library, an escript, or a REPL. Evaluates expressions such as 3 meters to feet or 100 celsius to fahrenheit with dimensional analysis and locale-aware output.

Serialization

Ecto types and database support, so locale-aware values are stored structurally rather than flattened to strings.

  • localize_sql 1.0.0 — locale-aware PostgreSQL ICU collation for query ordering and comparison, resolved from a language tag by CLDR language matching, with migration helpers for collations PostgreSQL does not preload. Also provides Ecto types for units of measure, currencies, language tags, territories, scripts, integer and date ranges, and durations.
  • ex_money_sql 2.1.0 — Ecto type and database support for ex_money, storing money as a composite type with database-side aggregates (sum, min, max, avg) and arithmetic operators, built on the same DDL machinery as localize_sql.

Inputs

Phoenix LiveView components for locale-aware form input. These are pre-1.0 and still evolving. This is not an area of strength for me so feedback is very very welcome.

They all share a CSS token set, Gettext catalog, and validation error structure. Server-side parsers accept what the user types in their locale’s conventions — digit shaping, group and decimal separators, calendar systems, date patterns.

  • localize_inputs_core 0.2.0 — shared foundation: validation errors, the Gettext backend for UI strings, and CSS tokens. Pulled in transitively by the components below.
  • localize_number_inputs 0.2.0<.number_input> for decimals and integers with cursor-preserving live formatting, and <.unit_input> with a searchable unit picker covering CLDR units and locale-preferred unit systems.
  • localize_datetime_inputs 0.2.0<.date_input> with a popup calendar accepting CLDR short, medium, long, and full date patterns as well as ISO 8601, plus range selection. Multi-calendar input (Buddhist, Japanese imperial, Islamic, Persian, Hebrew, ROC) via calendrical.
  • ex_money_input 0.3.0<.money_input> with a searchable currency picker, parsing amounts in the locale’s conventions and producing a Money.t().

Tooling

  • localize_mcp 0.2.0 — a Model Context Protocol server exposing the Localize API to AI agents. Intended for local use, communicating over stdin. Which means it probably doesn’t work on Windows (definitely not tested on Windows).

Playgrounds

Two live instances for trying the libraries without installing anything. Note these are running on the free tier small shared hosts on fly.io so performance and scale are limited. They are both on Localize GitHub so feel free to spin them up on your own system too.

Requirements

Elixir 1.17 or later, Erlang/OTP 26 or later.

Documentation is on hexdocs and the organization is at github.com/elixir-localize. Comments, bugs, suggestions and abuse? Open an issue and I’ll get right on it.

Showing Posts 1 to 10

AstonJ

AstonJ

Congrats Kip :048: and thanks for all the work you do on your awesome libraries :049:

DVS_Labs

DVS_Labs

Great work on reaching 1.0 !

I can attest that kip has been really committed to getting this released and promptly fixing issues that have come up, including a few I reported. Thanks kip

Terbium-135

Terbium-135

Thank you Kip for all the work and fixing issues “almost at the speed of light” :high_voltage:

iiro

iiro

Amazing! Been heavily using the ex_cldr_* libraries and they have been great. Cool to see ex_money_input too, been getting away without anything like it, but gonna take it for a test drive.

ErikNaslund

ErikNaslund

Thanks a bunch @kip for all the awesome work!

I switched from ex_cldr to localize a few months back and it was a really smooth transition. I’m sure there’s a lot of new goodies available that I’m not even using yet, but the compile time decrease alone made it more than worth it for me!

tjchambers

tjchambers

Looking forward to migrating to this from ex_cldr.

Is there a migration guide for making the coding changes?

kip

kip OP

ex_cldr Core Team

@tjchambers, yes, there is. I think you should find it quite straight forward (and feedback seems to confirm that). Of course let me know if you have any questions.

FedericoAlcantara

FedericoAlcantara

Thanks @kip

Seems pretty mechanical, perfect for an agent. Just added the adoption of localize to my pending issues.

Thanks again!

kip

kip OP

ex_cldr Core Team

Yes, I think that should work. The API is, in general, very similar with the exception of omitting any reference to a “backend” module. Some function names and arguments were changed in the interests of clarity and consistency - otherwise the changes are all architectural, packaging and configuration.

Of course let me know (open an issue) if there’s a problem or an opportunity.

tjchambers

tjchambers

All converted. Went very smoothly!

— All posts loaded —

Where Next? Top

Trending in News & Updates Top

kip
I’m a bit excited to announce that Localize and friends are now at release 1.0. Even though it’s a 1.0 release, it stands on 8 years of w...
New
bartblast
After building Hologram and sharing updates across various places, I’ve realized there’s a lot happening that doesn’t always make it to t...
New
bartblast
Hologram v0.11 is out! Two headline features this release. First, Elixir regexes now run in the browser. They were server-only until now,...
New
nseaSeb
Just published search_ash 0.5.0 (with search_core 0.4.0) on Hex. What’s new: synonyms You can now declare a synonym dictionary per lang...
New
mudasobwa
After years of struggling I made StreamData dependency optional. Finitomata.ExUnit got testing primitives for Persistence. Full back co...
New
mudasobwa
MdexMultilineCells is an MDEx plugin enabling multi-line cells in Markdown tables with full inline/block Markdown rendering and automati...
New
sullyMusty
ActiveMemory 0.8.0 — in-memory tables that speak Ecto ActiveMemory 0.8.0 is now on Hex. ActiveMemory is an in-memory store built on ETS ...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge &amp; Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews