kip

kip

ex_cldr Core Team

Localize - next generation localisation (ex_cldr v3.0)

Localize is the next generation localisation library for Elixir. Think of it as ex_cldr version 3.0. The first version will be released before the end of March 2026 and is under active development.

The goals and objectives are documented on Github, with the headline objectives being:

  • No “backend” architecture, CLDR data will be stored in :persistent_term.
  • No compile-time configuration. Runtime all the way.
  • Dynamic loading of locales. No more compile-time configuration of supported locales. Downloading and storage/access will be pluggable. This may suit organisations with specific security policies or running Localize on devices with limited connectivity or resources.
  • Simplified library packaging. Localize will have everything except web-oriented and SQL oriented modules which will go in their own libraries.
  • A Phoenix-based locale explorer will be available to make it easier and clearer to see what capabilities are possible with Localize (enabled by CLDR). At a later stage the locale explorer will also be hosted on a publicly available web server.

Note this will not be a drop-in replacement. However the public API will be very very similar with the main breaking change being the removal of any backend argument.

Feedback, suggestions all very welcome either here, or on GitHub discussions.

Most Liked

kip

kip

ex_cldr Core Team

Localize will officially launch next Monday. I’ve got a full week of launch activity planned. And a shiny new blog at elixir-localize.com where I’m committed to spending more time writing about they why and how localisation matters and how localize can make it almost trivial to write localised Elixir applications.

Each day next week there is something launching:

  • Monday is the core localize library. It compiles faster than ex_cldr, runs faster, uses less memory, has simpler packaging (nearly everything in one package).

  • Tuesday is localize_web that includes accept-header parsing and locale setting, localised routes and some HTML helpers.

  • Wednesday is the launch of localize_person_names for formatting names in a localised manner; in formal, informal and other ways. And the launch of Calendrical which is a consolidated set of calendars now including Gregorian, Julian, Islamic (four variants), Hebrew, Persian, Indian, Buddhist, Composite and user definable. And a few more I probably missed.

  • Thursday its time for some new fun things. localize_phonenumber that wraps libphonenumber for parsing and formatting phone numbers and localize_address for parsing free-form address data and then formatting its using the OpenCageData templates.

  • Friday is the “one more thing” release. It’s called Intl and its an API wrapper for Localize that maps very closely to the Javascript Intl API. This should make it easier for developers who are more front-end savvy to adopt localisation in Elixir more easily.

I’ll be posting more long form content at elixir-localize.com as the week progresses.

Eight years into developing ex_cldr and friends I think I can say confidently that localize is better in every way. I hope you’ll try it out, give feedback, open issues and help me make that claim a reality.

34
Post #9
kip

kip

ex_cldr Core Team

Day #1 of Localize launch week and Localize version 0.1.0 is now live on hex. It brings 8 years of experience of building ex_cldr together with a revised and simplified architecture, more capabilities, greater CLDR conformance, faster performance and better developer experience.

My hope is that localize will encourage more developers to build localisation into their apps from the beginning. Whether you plan to deliver an app in a single locale or many, localize just makes it easier. In a single library you get just about everything CLDR can deliver to make localisation and personalisation a pleasurable experience.

It’s a 0.1.0 release but its build on years of experience from ex_cldr. It will look very similar to developers who have used ex_cldr, but there are tons of changes and additions too. So I expect a few rough edges and I would really encourage anyone jumping on board to open issues or start a discussion. I think it won’t take too long to get to a 1.0 release.

I’ll also be blogging about the changes in localize, about localisation in general and about tips and trick on the Elixir Localize blog. There’s an RSS feed too. The blog is built using static_blog that I build for the site - but you might find it useful too.

Design goals met

Migrating from ex_cldr

If you’re migrating from ex_cldr, the migration guide will help. The overall API will look very familiar, with the most obvious change being that there is never a backend function argument or option.

And of course you don’t need to juggle multiple libraries, deal with compile-time configuration or generate backend modules.

Functional Highlights

  • Current CLDR v48.2 locale data with lazy runtime loading from ETF files cached in :persistent_term. No compile-time backend configuration required.

  • Number formatting — integers, decimals, percentages, currencies, ranges, and rule-based number formats (RBNF) including Roman numerals and CJK ideographs.

  • Date, time, and datetime formatting using CLDR calendar patterns with :short, :medium, :long, and :full styles, custom skeleton patterns, and interval formatting.

  • Unit formatting with plural-aware patterns, SI/binary prefixes, compound units, measurement system conversion, custom unit registration, and Localize.Unit.Operators for natural arithmetic (km + m).

  • List formatting with locale-appropriate conjunctions, disjunctions, and unit list styles. Per-element formatting via Localize.Chars.

  • ICU MessageFormat 2 (MF2) parser and interpreter with custom function registry, offset selection, JSON interchange, and bidirectional text support.

  • Gettext integration — Localize.Gettext.Interpolation provides MF2-based interpolation for Gettext backends.

  • Localize.Chars protocol — polymorphic locale-aware formatting with built-in implementations for 14 types and Any fallback to Kernel.to_string/1.

  • Currency metadata, ISO 4217 validation, and territory-to-currency mapping.

  • Display names for territories, languages, scripts, calendars, and full locale display names per the CLDR algorithm.

  • Unicode Collation Algorithm (UCA) with CLDR locale-specific tailoring for 97 languages, including digraph expansion and script reordering.

lawik

lawik

Nerves Core Team

You absolute legend.

16
Post #3

Where Next?

Popular in Announcing Top

sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 43487 311
New
mischov
import Meeseeks.CSS html = HTTPoison.get!("https://news.ycombinator.com/").body for story <- Meeseeks.all(html, css("tr.athing")) do...
New
brainlid
LangChain is short for Language Chain. An LLM, or Large Language Model, is the “Language” part. This library makes it easier for Elixir a...
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
woutdp
Hi! I wanted to introduce my latest project LiveSvelte. It allows you to render Svelte inside LiveView with end-to-end reactivity. It’s ...
New
Crowdhailer
Raxx is an alternative to Plug and is inspired by projects such as Rack(Ruby) and Ring(Clojure). 1.0-rc.1 is now available. To use it re...
New
sbs
Only 650 LOC, wrote for fun :slight_smile: https://github.com/sunboshan/qrcode
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36352 110
New
zoltanszogyenyi
Hey everyone :waving_hand: Excited to join this forum - I am one of the founders and current project maintainers of a popular and open-s...
New
tmbb
I’ve decided to create this topic to discuss optimization possibilities for something like Phoenix LiveView. I’ve created this topic unde...
144 10462 141
New

Other popular topics Top

sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 29603 241
New
hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New

Latest on Elixir Forum

We're in Beta

About us Mission Statement