All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.
[0.7.0] — 2026-05-13
Enhancements
Localize.HTML.Message— new function component (andLocalize.HTML.message/1facade) that renders an MF2 message preserving inline markup. Thelinkdefault renderer uses Phoenix's<.link>and so acceptshref,navigate, orpatchMF2 attributes; per-call:componentsandconfig :localize_web, :mf2_markup, components: %{…}override the defaults, and unknown tags raiseLocalize.HTML.Message.UnknownMarkupError.Localize.HTML.t/1andt/2— new compile-time macros for HEEx templates that combine Gettext extraction, MF2 binding interpolation, and markup rendering in one call:{t("Read {#bold}terms{/bold}")}. Elixir#{@user.name}interpolations have theassignsprefix stripped so derived binding names match what a developer would write (@user.name→user_name).
Test infrastructure
mix testnow runsmix localize.download_localesfirst, populating CLDR data for the locales referenced by the suite (en,fr,de,th,ja,ar,zh,zh-Hans,zh-Hant). Fresh checkouts and CI no longer fail on missing locale display data.
[0.6.0] — 2026-05-11
Enhancements
- Add
path_for/2andurl_for/2macros toLocalize.VerifiedRoutesto render a verified path or URL in an explicit locale without changing the process-wide locale, supporting language-switcher and hreflang use cases that need every configured locale rendered in one template pass.
[0.5.1] — 2026-04-25
Bug Fixes
Ignore out-of-range and zero-weight q-values when parsing
accept-languageheaders per RFC 9110. Thanks to @rubas for the PR. Closes #6.Expose
month_select/3andmonth_options/1on theLocalize.HTMLfacade as documented in the moduledoc. Thanks to @rubas for the PR. Closes #9.Honor the
:calendaroption inLocalize.HTML.Monthby sourcing month labels from the CLDR calendar returned by the calendar module'scldr_calendar_type/0function. Thanks to @rubas for the PR. Closes #10.
Changes
- Document that
fetch_session/1must run beforeLocalize.Plug.PutLocalewhen:sessionor:cookiesources are used. Thanks to @rubas for the PR. Closes #7.
[0.5.0] — 2026-04-17
Bug Fixes
- Be more lenient when parsing invalid
accept-languageheaders. Duplicateq=might be invalid syntax but they shouldn't crash the parser. Thanks to @woylie for the report. Closes #3.
[0.4.0] — 2026-04-16
Changes
- Don't call
Localize.default_locale/0at compile time. That causeslocalizeto be loaded at compile time which causes issues on machines with constrained resources. Defer the call to runtime.
[0.3.0] — 2026-04-16
Changes
- Make
phoenix_html_helpersa required dependency (it was optional).
[0.2.0] — 2026-04-15
Changes
- Fix docs links in the package.
[0.1.0] — 2026-04-13
Highlights
Initial release of localize_web, providing Phoenix integration for the Localize library. This library consolidates the functionality previously provided by ex_cldr_plugs, ex_cldr_routes, and cldr_html into a single package.
Locale discovery plugs that detect the user's locale from the accept-language header, query parameters, URL path, session, cookies, hostname TLD, or custom functions. Includes session persistence and LiveView support.
Compile-time route localization that translates route path segments using Gettext, generating localized routes for each configured locale. Supports locale interpolation, nested resources, and all standard Phoenix route macros.
Verified localized routes via the
~qsigil, providing compile-time verification of localized paths that dispatch to the correct translation based on the current locale.Localized HTML form helpers that generate
<select>tags and option lists for currencies, territories, locales, units of measure, and months with localized display names.
See the README for full documentation and usage examples.