Oh man!! Those macros being officially part of the shape of localize is nice!
Awesome stuff as usual, we’re rocking Localize in production and it has been a very, very good experience. Localize.Inputs.Date.Components.DatePickerLive got me thinking. We’re used to splitting locale into language, timezone and formatting conventions. We have a lot of customers who want to see e.g. the UI in English, in Amsterdam timezone, with Swedish datetime format. I feel like most people (and libraries) assume locale should implicitly determine both language and formatting preferences. Just out of curiosity, how do you, or anyone here, feel about this?
Just out of curiosity, how do you, or anyone here, feel about this?
As a library writer I try to be aggressively ambivalent about it. By which I mean, use Localize.default_locale/0 if not specified, but take a :locale option on all functions so you can achieve what you’re after - at least in Localize.
I broadly agree that users see value in being more explicit about their choices if they want to. But should also get a reasonable response if they don’t have firm preferences. The UI to make all of that straight forward is not something I’m skilled at at all!
PS: Really glad you’re finding Localize up to the job, thanks for saying so.
I’ve published localize version 0.45.0 which has a primary focus on conformance, robustness and code quality. A lot of bugs have been squashed.
In combination with this release as well as 0.44.0, 0.43.0, 0.42.0 and 0.41.0, I consider Localize now to be a solid 1.0 candidate release. This means that you can expect a period of stability after a flurry or work and you can expect a 1.0 candidate release by the end of July.
Changelogs
Deprecations
While it’s not yet at 1.0, I have tried to keep the public API stable. However in the interests of consistency in function naming and stability for the long term, I have made a few changes in 0.43.0.
The existing function names will continue to operate but will issue a depreciation message. The deprecated functions will be removed when I publish Localize 1.0.
Deprecated functions (and their replacements)
The naming rule is now uniform: known_* is the locale-independent CLDR universe, supported_* reflects configuration, and *_for is data localized into a display locale. The renamed functions are:
-
Language.available_languages/1→Language.languages_for/1. -
Language.known_languages/1→Language.language_names_for/1. -
Script.available_scripts/1→Script.scripts_for/1. -
Script.known_scripts/1→Script.script_names_for/1. -
Subdivision.available_subdivisions/1→Subdivision.subdivisions_for/1. -
Subdivision.known_subdivisions/1→Subdivision.subdivision_names_for/1. -
Territory.available_styles/0→Territory.known_styles/0.
Renamed options
Two option names are also swapped for consistency; the deprecated keys remain accepted until 1.0:
-
The
:styleoption ofLocalize.Duration.to_string/2and ofLocalize.quote/2is deprecated in favour of:format. -
The
:formatoption ofLocalize.Unit.display_name/2is deprecated in favour of:style.
One of the biggest complaints about ex_cldr has always been the compile time cost. Localize improved on that out-of-the-box, but not in a material way. But with today’s Localize version 0.46.0, you can expect significant improvement in compile time.
On my Mac M1 Max, a cold compile has reduced from 66s → 3.5s, a 19x improvement. In addition, the generated BEAM files are 1.7Mb smaller.
Now you can expect Localize to be more robust, more conformant and faster at compiling.
Localize — the road to 1.0
Localize consolidates the ex_cldr_* family into a single package — CLDR-based formatting for numbers, currencies, dates/times, units, lists, messages (MessageFormat 2) and locale-aware collation, with no compile-time backend modules.
It has been through an intensive quality cycle over the last weeks (releases 0.42 through 0.46: TR35 conformance fixes, the MessageFormat 2 working-group test suite, test coverage from 70% to 91%, and a compile-time reduction from ~66s to ~3.5s). The API has been stable since 0.43. It is time to talk about 1.0.
End of July 2026 — Localize 1.0
The API that exists today in 0.46 is the 1.0 API. The only removals are the delegates and option keys deprecated since 0.43, per the notices they have carried (“removed by Localize 1.0”):
- The inventory functions renamed to the uniform scheme —
known_*(the CLDR universe),supported_*(your configuration),*_for(localized into a display locale). The deprecated names areLanguage.available_languages/1,Language.known_languages/1,Script.available_scripts/1,Script.known_scripts/1,Subdivision.available_subdivisions/1,Subdivision.known_subdivisions/1andTerritory.available_styles/0.
- The
:styleoption ofLocalize.Duration.to_string/2andLocalize.quote/2(use:format), and the:formatoption ofLocalize.Unit.display_name/2(use:style).
If your app compiles today without deprecation warnings, Localize 1.0 is a drop-in upgrade.
Localize 1.0 does not drop support for OTP 26
I announced that OTP 26 support ends on December 31st 2026, and that date stands. Localize 1.0 runs on OTP 26 exactly as 0.46 does (with json_polyfill in your deps). The only change is that applications starting on OTP 26 will log a one-time warning pointing at the December date.
October 2026 — CLDR 49
This is the regular annual data update, probably shipped as a Localize 1.1 release when Unicode publishes CLDR 49. Data changes only from your perspective; any output changes that come from Unicode’s own data revisions will be listed in the changelog as usual.
Early January 2027 — Localize 1.2
OTP 26 support is removed, honouring the December 31st end-of-support date. This is the release where json_polyfill stops being needed and stops being supported.
What to do now to prepare for 1.0
- Upgrade to Localize 0.46 and fix any deprecation warnings — that is the entire 1.0 migration.
- If you are on OTP 26, plan your OTP upgrade for before the end of the year.
- If you are migrating from
ex_cldr_*, the migration guide covers the mapping.
Documentation
- Docs are at hexdocs.pm/localize,
- Full changelog at hexdocs.pm/localize/changelog.html,
- Issues at github.com/elixir-localize/localize.
Feedback on the plan is welcome — particularly if the OTP 26 timeline creates a problem for your deployment that I have not considered.
There’s been a flurry of releases in the last 10 days starting with Localize 1.4.0 which is moved to be based upon CLDR 49. If you’re a Localize user and you didn’t notice - thats great. It means the Localize ecosystem is reaching a reasonable state of stability.
In fact there have been, since October 23rd:
- 7 Localize releases (the latest is Localize 1.6.1)
- 248 bug fixes
- 56 new features
- 57 behaviour changes
- 6 releases of Calendrical including a full re-write of the core calendar engine and the moving of date/time parsing from Calendrical to Localize
By any measure thats an unusual amount of churn. Which I think deserves some explanation.
-
Localize 1.4.0’s primary focus was adopting CLDR 49. At the same time, the CLDR team published some additional test corpus - especially for number formatting and date/time formatting - which gave gave me an opportunity to incorporate that corpus in Localize. Those additions drove the majority of the 226 bug fixes in Localize 1.4.0 and those were mostly in the smaller more remote corners of the CLDR universe. Which is why I expect most consumers didn’t notice a thing. There are also some new capabilities in Localize 1.4 and later that I’ll describe in another post (inflections, moving of date/time parsing from Calendrical to Localize, …)
-
Localize 1.4.1 and 1.4.2 followed quite quickly when I discovered that
NaNor±Infinityformatting would crash the number formatter. A couple of bugs relating to significant and fractional digits were squashed as well. -
Localize 1.4.3 focused on number formatting performance regressions. Formatting with default options improved by 50% and compact number formatting by about 40%.
-
Localize 1.5.0 wasn’t originally planned. But @rubas submitted a PR to ex_money that was strong motivation to move the parsing and scanning of money (currency and amount) from ex_money to Localize. And in making that move it was the right time to be far more rigorous about that parsing with the primary goal of limiting the possibility of an incorrect value being returned. To do that, a much stronger test corpus was assembled: 6,843 money values across 182 locales sourced from ICU, CLDR, and two other open source projects: scrapinghub/price-parser and bojanz/currency. Lastly, to directly address the issue raised by @rubase, the Swiss Federal Chancellery Schreibweisungen.
-
Localize 1.6.0 intoduced a small change to calendar callbacks for eras and it probably could have survived as a 1.5.1 release. And 1.6.1 fixed a couple of data generation issues that caused some localize fallback bugs - now fixed.
Thats the full, long story. Congratulations if you got this far!.
Despite all of that recent churn, the Localize (and localisation in general, following on from ex_cldr) is now in the strongest position it has ever been. All sections of TR35 are implemented fully with almost no functional gaps. It’s as compliant as any implementation can claim. There are currently no open issues (but of course that will change). And the data generation pipeline, CLDR upgrade process and compliance testing framework mean that it’s now far easier and almostly completely automated to upgrade to new CLDR releases.
I might even be able to claim that Localize is “finished”. Instead, let’s settle for “mostly stable, probably”.
If you were wondering when to consider migrating from ex_cldr to localize and haven’t already done so, now would be a good time.
What’s new in Localize 1.4 (and later)? All the changes are in the changelog - this is a summary of the highlights:
-
Built on CLDR 49 and Unicode 18. CLDR 49 no longer publishes 114 locales below Basic coverage, collation follows UCA 18, and its new data is supported, from dual and UTC offset formats to new units and the Unicode 18 currency signs.
-
Significant work on date and time formatting towards TR35 full conformance: semantic skeletons, append items, qualified metazone names, cyclic years, and a calendar’s own weeks and quarters.
-
Date, time, date-time and interval parsing move from Calendrical into Localize, so an application that uses only the proleptic Gregorian calendar (ie Calendar.ISO) no longer needs Calendrical. Calendars other than
Calendar.ISOcome from Calendrical 2.0 -
Time zones are parsed and resolved by
Localize.DateTime.Timezone.parse_zone/2,resolve/3andparse_offset/2, andLocalize.TimeZoneDatabasehandles fixed offsets. -
Localize.Inflectionis added as a technical preview: inflected words, pronouns and quantities, MessageFormat 2’si:functions and inflected units. -
Money parsing moved from ex_money to Localize.
Parsing examples
Parsing of numbers, money and dates/times is significantly improved in the latest releases so here are a few examples you might find useful.
Numbers
iex> Localize.Number.Parser.parse("12.345,67", locale: :de)
{:ok, 12345.67}
iex> Localize.Number.Parser.parse("1,23,456.78", locale: "en-IN")
{:ok, 123456.78}
iex> Localize.Number.Parser.parse("١٬٢٣٤٫٥٦", locale: "ar-EG")
{:ok, 1234.56}
iex> Localize.Number.Parser.parse("1’234.56", locale: "de-CH")
{:ok, 1234.56}
iex> Localize.Number.Parser.parse("−5", locale: :en)
{:ok, -5}
iex> Localize.Number.Parser.parse("(5)", locale: :en)
{:ok, -5}
iex> Localize.Number.Parser.parse("127,54-", locale: :de)
{:ok, -127.54}
# de-AT writes "€ 1.234,56" but "1 234,56" plain, so the period groups only with :currency
iex> Localize.Number.Parser.parse("1.234,56", locale: "de-AT")
{:error, %Localize.InvalidValueError{value: "1.234,56", expected: "a parseable number string", allowed_values: nil, context: "Localize.Number.Parser"}}
iex> Localize.Number.Parser.parse("1.234,56", locale: "de-AT", currency: :EUR)
{:ok, 1234.56}
# en-ZA has two separator sets
iex> Localize.Number.Parser.parse("1 234,56", locale: "en-ZA")
{:ok, 1234.56}
iex> Localize.Number.Parser.parse("1,234.56", locale: "en-ZA", separators: :us)
{:ok, 1234.56}
# ambiguous text is refused, never guessed: "1234" is no German group, and a
# group cannot follow the decimal mark
iex> Localize.Number.Parser.parse("1234.56", locale: :de)
{:error, %Localize.InvalidValueError{value: "1234.56", expected: "a parseable number string", allowed_values: nil, context: "Localize.Number.Parser"}}
iex> Localize.Number.Parser.parse("1,234.56", locale: :de)
{:error, %Localize.InvalidValueError{value: "1,234.56", expected: "a parseable number string", allowed_values: nil, context: "Localize.Number.Parser"}}
iex> Localize.Number.Parser.scan("Der Preis ist 23 und die Steuer 1.234,50", locale: :de)
["Der Preis ist ", 23, " und die Steuer ", 1234.5]
iex> Localize.Number.Parser.scan("السعر ١٢٣٤٫٥ جنيه", locale: "ar-EG")
["السعر ", 1234.5, " جنيه"]
Dates and Times
iex> Localize.Date.parse("March 22, 2026", locale: :en)
{:ok, ~D[2026-03-22]}
iex> Localize.Date.parse("22 mars 2026", locale: :fr)
{:ok, ~D[2026-03-22]}
iex> Localize.Date.parse("2026年3月22日", locale: :ja)
{:ok, ~D[2026-03-22]}
iex> Localize.Date.parse("٢٢ مارس ٢٠٢٦", locale: "ar-EG")
{:ok, ~D[2026-03-22]}
iex> Localize.Date.parse("4/3/2024", locale: :en)
{:ok, ~D[2024-04-03]}
iex> Localize.Date.parse("4/3/2024", locale: "en-GB")
{:ok, ~D[2024-03-04]}
# Hawaiian writes its short month in Roman numerals
iex> Localize.Date.parse("31/xii/24", locale: :haw)
{:ok, ~D[2024-12-31]}
iex> Localize.Date.parse("2026-W25-2", locale: :en)
{:ok, ~D[2026-06-16]}
iex> Localize.Date.parse("2026-03", locale: :en, as: :map)
{:ok, %{calendar: Calendar.ISO, month: 3, year: 2026}}
iex> Localize.Time.parse("2 PM", locale: :en)
{:ok, ~T[14:00:00]}
iex> Localize.Time.parse("১০:০৫ AM", locale: :bn)
{:ok, ~T[10:05:00]}
iex> Localize.Time.parse("11:59 PTG", locale: :ms)
{:ok, ~T[23:59:00]}
iex> Localize.Time.parse("14h30", locale: :fr, format: "HH'h'mm")
{:ok, ~T[14:30:00]}
iex> Localize.DateTime.parse("3/4/2024 22:05", locale: :en, format: "d/M/y HH:mm")
{:ok, ~N[2024-04-03 22:05:00]}
iex> Localize.DateTime.parse("2026-05-23T14:30:00+05:00", locale: :en)
{:ok, #DateTime<2026-05-23 14:30:00+05:00 +05:00 +05:00>}
iex> Localize.DateTime.parse("May 16, 2026 2:30 PM GMT+10:30", locale: :en)
{:ok, #DateTime<2026-05-16 14:30:00+10:30 +10:30 +10:30>}
iex> Localize.DateTime.Timezone.parse_offset("غرينتش+٥:٣٠", locale: "ar-EG")
{:ok, 19800}
iex> Localize.DateTime.Timezone.parse_zone("Pacific Time", locale: :en)
{:ok, {:zone, "America/Los_Angeles", :generic}}
# named zones resolve through whatever time zone database is configured (:tz here)
iex> Localize.DateTime.parse("May 16, 2026 at 2:30 PM Pacific Daylight Time", locale: :en)
{:ok, #DateTime<2026-05-16 14:30:00-07:00 PDT America/Los_Angeles>}
iex> Localize.DateTime.parse("16. Mai 2026 um 14:30 Mitteleuropäische Sommerzeit", locale: :de)
{:ok, #DateTime<2026-05-16 14:30:00+02:00 CEST Europe/Berlin>}
# whatever a locale writes reads back
iex> Localize.DateTime.to_string(DateTime.new!(~D[2026-05-16], ~T[14:30:00], "America/New_York"), locale: :fr, format: :full)
{:ok, "samedi 16 mai 2026 à 14:30:00 heure d’été de l’Est nord-américain"}
iex> Localize.DateTime.parse("samedi 16 mai 2026 à 14:30:00 heure d’été de l’Est nord-américain", locale: :fr)
{:ok, #DateTime<2026-05-16 14:30:00-04:00 EDT America/New_York>}
Date & Time Intervals
iex> Localize.Interval.to_string(~D[2024-02-05], ~D[2024-02-09], locale: :fr)
{:ok, "5–9 févr. 2024"}
iex> Localize.Interval.parse("5–9 févr. 2024", locale: :fr)
{:ok, Date.range(~D[2024-02-05], ~D[2024-02-09])}
iex> Localize.Interval.parse("2024年2月5日~9日", locale: :ja)
{:ok, Date.range(~D[2024-02-05], ~D[2024-02-09])}
Money
Money parsing now lives in Localize, not ex_money. But of course there is no Money.t/0 struct in Localize so we return a tuple {currency, amount} here.
iex> Localize.Number.parse_currency_amount("1.234,56 €", locale: :de)
{:ok, {:EUR, Decimal.new("1234.56")}}
iex> Localize.Number.parse_currency_amount("-CHF 1'234.56", locale: "de-CH")
{:ok, {:CHF, Decimal.new("-1234.56")}}
iex> Localize.Number.parse_currency_amount("(1 234,56 €)", locale: :fr)
{:ok, {:EUR, Decimal.new("-1234.56")}}
iex> Localize.Number.parse_currency_amount("₹1,23,456.78", locale: :hi)
{:ok, {:INR, Decimal.new("123456.78")}}
iex> Localize.Number.parse_currency_amount("٥٬٢٣٤٫٥٦ ج.م.", locale: "ar-EG")
{:ok, {:EGP, Decimal.new("5234.56")}}
iex> Localize.Number.parse_currency_amount("kr. 1.234,56", locale: :da)
{:ok, {:DKK, Decimal.new("1234.56")}}
iex> Localize.Number.parse_currency_amount("100 US dollars", locale: :en)
{:ok, {:USD, Decimal.new("100")}}
iex> Localize.Number.parse_currency_amount("12 euros", locale: :en)
{:ok, {:EUR, Decimal.new("12")}}
# the same symbol is a different currency in each locale
iex> Localize.Number.parse_currency_amount("$5", locale: :en)
{:ok, {:USD, Decimal.new("5")}}
iex> Localize.Number.parse_currency_amount("$5", locale: "en-AU")
{:ok, {:AUD, Decimal.new("5")}}
iex> Localize.Number.parse_currency_amount("$5", locale: "en-CA")
{:ok, {:CAD, Decimal.new("5")}}
# Swiss and Dutch whole amounts
iex> Localize.Number.parse_currency_amount("CHF 5.–", locale: "de-CH")
{:ok, {:CHF, Decimal.new("5")}}
iex> Localize.Number.parse_currency_amount("€ 5,-", locale: :nl)
{:ok, {:EUR, Decimal.new("5")}}
# an amount that could be read two ways is refused, with the reason
iex> Localize.Number.parse_currency_amount("1,599 €", locale: :de)
{:error, %Localize.InvalidAmountError{currency: :EUR, amount: "1,599", cause: %Localize.ParseError{input: "1,599", reason: :unexpected_input, offset: nil, line: nil, column: nil, rest: nil, detail: "it may be a whole amount written with a group separator", cause: nil, size: nil, limit: nil}}}
iex> Localize.Number.parse_currency_amount("1.599 €", locale: :de)
{:ok, {:EUR, Decimal.new("1599")}}
iex> Localize.Number.parse_currency_amount("1,59 €", locale: :de)
{:ok, {:EUR, Decimal.new("1.59")}}
iex> Localize.Number.parse_currency_amount("5", locale: :en, default_currency: :USD)
{:ok, {:USD, Decimal.new("5")}}
iex> Localize.Number.parse_currency_amount("$5", locale: "en-AU", only: [:USD])
{:error, %Localize.UnknownCurrencyError{currency: "$"}}
Localize 1.4 also shipped a new Localize.Inflection module that is a technical preview, with data for 48 languages from the Unicode inflection project. Inflecting correctly is very important when producing grammatically correct messages to users.
Here are some examples that give some insight into the underlying power of the inflection engine. I’ll be writing more about messages (message format 2), including inflection, in later posts:
Words and phrases
iex> Localize.Inflection.inflect("light on the patio", :en, number: :plural)
{:ok, "lights on the patio"}
iex> Localize.Inflection.inflect("the cat", :en, definiteness: :indefinite)
{:ok, "a cat"}
iex> Localize.Inflection.inflect("universidad", :es, number: :plural, definiteness: :definite)
{:ok, "las universidades"}
iex> Localize.Inflection.inflect("gato", :es, gender: :feminine)
{:ok, "gata"}
iex> Localize.Inflection.inflect("casa", :pt, number: :plural, definiteness: :definite)
{:ok, "as casas"}
iex> Localize.Inflection.inflect("Haus", :de, case: :dative, number: :plural)
{:ok, "Häusern"}
iex> Localize.Inflection.inflect("das Haus", :de, case: :genitive)
{:ok, "des Hauses"}
iex> Localize.Inflection.inflect("новый дом", :ru, case: :instrumental)
{:ok, "новым домом"}
iex> Localize.Inflection.inflect("kot", :pl, case: :genitive, number: :plural)
{:ok, "kotów"}
iex> Localize.Inflection.inflect("talo", :fi, case: :inessive)
{:ok, "talossa"}
iex> Localize.Inflection.inflect("talo", :fi, case: :illative, number: :plural)
{:ok, "taloihin"}
iex> Localize.Inflection.inflect("ev", :tr, case: :locative)
{:ok, "evde"}
iex> Localize.Inflection.inflect("집", :ko, case: :nominative)
{:ok, "집은"}
iex> Localize.Inflection.inflect("लड़का", :hi, gender: :feminine)
{:ok, "लड़की"}
iex> Localize.Inflection.inflect("ספר", :he, definiteness: :definite)
{:ok, "הספר"}
Asking a word about itself
iex> Localize.Inflection.feature("luces", :es, :number)
{:ok, :plural}
iex> Localize.Inflection.feature("Mädchen", :de, :gender)
{:ok, :neuter}
iex> Localize.Inflection.feature("дом", :ru, :gender)
{:ok, :masculine}
iex> Localize.Inflection.feature_values(:fi, :case)
{:ok, [:abessive, :ablative, :adessive, :allative, :elative, :essive, :genitive, :illative, :inessive, :nominative, :partitive, :translative]}
iex> Localize.Inflection.known?("xyzzy", :en)
false
Pronouns
iex> Localize.Inflection.pronoun(:en, person: :first, case: :genitive)
{:ok, "mine"}
iex> Localize.Inflection.pronoun(:en, "they", gender: :feminine)
{:ok, "she"}
iex> Localize.Inflection.pronoun(:de, person: :third, gender: :feminine, case: :dative)
{:ok, "ihr"}
iex> Localize.Inflection.pronoun(:es, person: :first, number: :plural, gender: :feminine)
{:ok, "nosotras"}
Counting things
iex> Localize.Inflection.quantify("2", "час", :ru, plural: :few)
{:ok, "2 часа"}
iex> Localize.Inflection.quantify("5", "час", :ru, plural: :many)
{:ok, "5 часов"}
iex> Localize.Inflection.quantify("5", "książka", :pl, plural: :many)
{:ok, "5 książek"}
iex> Localize.Inflection.quantify("3", "talo", :fi, plural: :other)
{:ok, "3 taloa"}
iex> Localize.Inflection.quantify("2", "رسالة", :ar, plural: :two)
{:ok, "رسالتان"}
iex> Localize.Inflection.quantify("3", "개", :ko, plural: :other)
{:ok, "3개"}
# units inflect too
iex> Localize.Unit.to_string(Localize.Unit.new!(2, "kilometer"), locale: :de, grammatical_case: :dative)
{:ok, "2 Kilometern"}
iex> Localize.Unit.to_string(Localize.Unit.new!(2, "kilometer"), locale: :ru, grammatical_case: :prepositional, inflect: :safe)
{:ok, "2 километрах"}
Using in Localize.Message (Message Format 2)
# verb agreement from the noun, with no plural branch in the message
iex> Localize.Message.format("The {$object} {is :i:inflect number=$object} on.", %{object: "lights"}, locale: :en)
{:ok, "The lights are on."}
iex> Localize.Message.format("The {$object} {is :i:inflect number=$object} on.", %{object: "light"}, locale: :en)
{:ok, "The light is on."}
# or as a selector
iex> message = """
...> .local $number = {$object :i:inflect to=number} .match $number
...> plural {{The {$object} are on.}}
...> * {{The {$object} is on.}}
...> """
iex> Localize.Message.format(message, %{object: "lights on the porch"}, locale: :en)
{:ok, "The lights on the porch are on."}
iex> Localize.Message.format("{$noun :i:quantify withValue=$n}", %{noun: "час", n: 22}, locale: :ru)
{:ok, "22 часа"}
iex> Localize.Message.format("{$p :i:pronoun withReferent=$obj}", %{p: "mío", obj: "casas"}, locale: :es)
{:ok, "mías"}
# Spanish "y" becomes "e" before an i sound, Italian "e" becomes "ed" before a vowel
iex> Localize.Message.format("{$words :i:list withType=and}", %{words: ["gatos", "idiomas"]}, locale: :es)
{:ok, "gatos e idiomas"}
iex> Localize.Message.format("{$words :i:list withType=and}", %{words: ["cani", "elefanti"]}, locale: :it)
{:ok, "cani ed elefanti"}
iex> Localize.Message.format("Your {$n :i:numeral withStyle=asWords withVariant=ordinal} meeting", %{n: 4}, locale: :en)
{:ok, "Your fourth meeting"}
# SSML output for speech
iex> Localize.Message.format("Hay {$unit :i:quantify withValue=$n} en el video", %{unit: "niño", n: 3}, locale: :es, output: :ssml)
{:ok, "Hay <sub alias=\"tres niños\">3 niños</sub> en el video"}


















