Changelog
View SourceCldr Routes v1.4.0
This is the changelog for Cldr Routes version 1.4.0 released on November 4th, 2025. For older changelogs please consult the release tag on GitHub
Possible breaking change
cldr_routesmatches a CLDR locale name (as used inex_cldr) to agettextlocale name. For ex_cldr v2.44.0 that matching process is more flexible and more compliant with the CLDR language matching algorithm. As a result, it is possible that some locales may match to a different gettext locale name than in previous versions. And therefore some route helpers may resolve differently as well.
Enhancements
Updated to CLDR 48.
Adds attribution of the original idea and implementation to Bart Otten.
Cldr Routes v1.3.2
This is the changelog for Cldr Routes version 1.3.2 released on December 15th, 2024. For older changelogs please consult the release tag on GitHub
Bug Fixes
Update LiveView support to include
"~> 1.0".Fix unquoting invalid AST for Elixir 1.18 and later.
Cldr Routes v1.3.1
This is the changelog for Cldr Routes version 1.3.1 released on August 23rd, 2024. For older changelogs please consult the release tag on GitHub
Bug Fixes
- Requires Gettext version 0.26 or later since that version has an incompatible API with previous versions and we wish to avoid more conditional code. Thanks to @krns for the PR to align the documentation and examples as well.
Cldr Routes v1.3.0
This is the changelog for Cldr Routes version 1.3.0 released on February 19th, 2024. For older changelogs please consult the release tag on GitHub
Enhancements
- Adds support for calling
url/{1,2,3}with asigil_q(localized verified route) parameter. ThePhoenix.VerifiedRoutes.url/1macro checks that its parameter is asigil_pcall. Sincesigil_qreturns acaseexpression with one or more case clauses returning asigil_presult, thePhoenix.VerifiedRoutes.url/1macro cannot be used directly. This release addsurl/{1,2,3}to theMyApp.Cldr.VerifiedRoutesmodule so it is compatible with existing code and supports bothsigil_pandsigil_qparameters. Thanks to @rigzad for the issue. Closes #16.
Cldr Routes v1.2.0
This is the changelog for Cldr Routes version 1.2.0 released on January 3rd, 2024. For older changelogs please consult the release tag on GitHub
Enhancements
- Configures
:phoenix_html_helpersas a dependency rather than the full:phoenixapp.:ex_cldr_routesonly uses the tag helper which is now hosted in the new library. Whilst deprecated within Phoenix, its use here is to generatehreflangheaders.
Cldr Routes v1.1.0
This is the changelog for Cldr Routes version 1.1.0 released on May 9th, 2023. For older changelogs please consult the release tag on GitHub
Bug Fixes
Fix Phoenix integration which was failing to compile when using Phoenix auth. Thanks to @rubas for the report and collaboration.
Fix dialyzer error. Thanks to @rubas for the report.
Deprecation
- The module
Cldr.Routeis renamed toCldr.Routesto better match Phoenix naming. As a result, the provider module to be added to a Cldr backend configuration is nowCldr.Routes, notCldr.Route.Cldr.Routeremains for now and if used will issue a deprecation warning.
Cldr Routes v1.0.0
This is the changelog for Cldr Routes version 1.0.0 released on May 3rd, 2023. For older changelogs please consult the release tag on GitHub
Enhancements
Supports localized verified routes with
~q(Sigil_q).Supports Phoenix 1.7 and later only.
Supports Elixir 1.11 and later only.
Cldr Routes v0.6.4
This is the changelog for Cldr Routes version 0.6.4 released on April 29th, 2023. For older changelogs please consult the release tag on GitHub
Bug Fixes
- Fixes route
:asoption to correctly stringify atom names. Closes #14. Thanks to @krns for the report.
Cldr Routes v0.6.3
This is the changelog for Cldr Routes version 0.6.2 released on April 27th, 2023. For older changelogs please consult the release tag on GitHub
Bug Fixes
Fix readme example. Thanks to @krns for the PR. Closes #12.
Support Phoenix 1.7. NOTE: Doesn't yet include localized verified routes.
Cldr Routes v0.6.2
This is the changelog for Cldr Routes version 0.6.2 released on August 6th, 2022. For older changelogs please consult the release tag on GitHub
Bug Fixes
- Uses the standard Phoenix
taghelper to generatehreflanghelpers.
Cldr Routes v0.6.1
This is the changelog for Cldr Routes version 0.6.1 released on July 24th, 2022. For older changelogs please consult the release tag on GitHub
Bug Fixes
- Fix
LocalizedHelpers.hreflang_links/1to return an empty string if links isnil.
Cldr Routes v0.6.0
This is the changelog for Cldr Routes version 0.6.0 released on July 24th, 2022. For older changelogs please consult the release tag on GitHub
Enhancements
- Adds
MyApp.Router.LocalizedHelpers.<helper>_linksfunctions to the generatedLocalizedHelpersmodule. These_linksfunctions are 1:1 correspondents to the_pathand_urlhelpers. The_linkhelpers generate link headers that help identify the other language versions of a page. They are used like this:iex> alias MyApp.Router.LocalizedHelpers, as: Routes iex> Routes.user_links(conn, :show, 1) |> Routes.hreflang_links() { :safe, [ ["<link href=", "\"http://localhost/users_de/1\"", "; rel=alternate; hreflang=", "\"de\"", " />"], "\n", ["<link href=", "\"http://localhost/users/1\"", "; rel=alternate; hreflang=", "\"en\"", " />"], "\n", ["<link href=", "\"http://localhost/users_fr/1\"", "; rel=alternate; hreflang=", "\"fr\"", " />"] ] }
Cldr Routes v0.5.0
This is the changelog for Cldr Routes version 0.5.0 released on July 22nd, 2022. For older changelogs please consult the release tag on GitHub
Bug Fixes
- Propogate locales on the
localizemacro to nested resources
Breaking change
- The locale is now stored in the
:privatefield of theconnfor both live routes and other routes. It was previously stored in the:assignsfield for non-live routes.
Cldr Routes v0.4.0
This is the changelog for Cldr Routes version 0.4.0 released on July 19th, 2022. For older changelogs please consult the release tag on GitHub
Bug Fixes
Fixed Localized route helpers were matching on the full locale, not on the
:gettext_locale_namefield. Thanks to @rubas for the report and collaboration. Closes #6.mix phx.routes MyApp.Router.LocalizedRouteswas attempting to "un"-translate the routes. This is no longer the case since doing so hides information required by developers. Closes #8.
Cldr Routes v0.3.0
This is the changelog for Cldr Routes version 0.3.0 released on July 17th, 2022. For older changelogs please consult the release tag on GitHub
Enhancements
Add support for
liveroutes. Thanks to @ringofhealth for the report. Closes #1.Support interpolating
locale,languageandterritoryinto a route. Thanks to @rubas for the suggestion. Closes #3. For example:
localize do
get "/#{locale}/locale/pages/:page", PageController, :show, as: "with_locale"
get "/#{language}/language/pages/:page", PageController, :show, as: "with_language"
get "/#{territory}/territory/pages/:page", PageController, :show, as: "with_territory"
endUses the macros from Gettext rather than the functions when generating routes. This means that the mix tasks
gettext.extractandgettext.mergenow work as expected. Closes #3.Rewrite the
LocalizedHelpersmodule that now proxies into the standard PhoenixHelpersmodule rather than maintaining a separate forked module. As a result:- The standard
Helpersmodule now generates helper names that have locale suffixes. That isuser_pathbecomesuser_en_path,user_fr_pathand so on. - The
LocalizedHelpersmodule hosts the standard helper names (likeuser_path) which will then call the appropriate standard helper depending on the result ofCldr.get_locale/1.
- The standard
Add functions to output the localised routes. At compile time a module called
MyApp.Router.LocalizedRoutesis created. This module hosts a__routes__/0function which can be passed as an argument to the Phoenix standardPhoenix.Router.ConsoleFormatter.format/1function that returns a string representation of configured localized routes. These can then beIO.puts/1as required. In the next release a mix task will automate this process.
Thanks to @rubas and @ringofhealth for their extreme patience while I worked this through. Closes #1, and #4.
Cldr Routes v0.2.0
This is the changelog for Cldr Routes version 0.2.0 released on March 26th, 2022. For older changelogs please consult the release tag on GitHub
Breaking Changes
- Changes the module name from
Cldr.RoutestoCldr.Routeto be consistent with the otherex_cldr-based libraries which use singular module names.
Cldr Routes v0.1.0
This is the changelog for Cldr Routes version 0.1.0 released on March 26th, 2022. For older changelogs please consult the release tag on GitHub
Enhancements
- Initial release