PhoenixKit 1.7.115: One setting for language prefixes across the site
PhoenixKit 1.7.115 adds one setting that decides whether the primary language shows its prefix in addresses, for the whole site.
On the Languages settings page, a new URL Behavior section has Default Language Without Prefix. When on, addresses such as /en/admin/users and /en/blog/post become /admin/users and /blog/post in admin pages, public pages, the sitemap and redirects. Other languages always keep their prefix. It is off by default, so addresses search engines already know stay the same, and admin links return to the /en/admin/... form. Both forms of an admin address keep working.
The publishing sitemap now follows the setting. A site that had turned on the old publishing-only setting is moved to the new one at the next start.
Full release notes: PhoenixKit 1.7.115
1.7.115 · 19 May 2026
Added
- Site-wide
default_language_no_prefixsetting on the Languages admin page (/admin/settings/languages) controls whether the primary language emits its locale segment in URLs. When on,/admin/usersand/blog/postreplace/en/admin/usersand/en/blog/postacross admin pages, public pages, sitemap, and redirects; other languages always keep their prefix. Default is off, matching the historical publishing default, so existing installs’ indexed URLs stay stable on upgrade. Installs that previously toggledpublishing_default_language_no_prefixget auto-migrated to the new key on the next boot viaLanguages.migrate_legacy/0(PR #552). @type t/0onPhoenixKit.Settings.Settingschema. Lets consumers spec setting-returning functions ({:ok, Settings.Setting.t()} | {:error, …}) without tripping dialyzer’sunknown_typewarning.
Changed
- Admin URL emission for the primary language now follows the new site-wide
default_language_no_prefixsetting (default off), restoring the/en/admin/usersshape that 1.7.114 had emitted prefixless unconditionally. Both URL shapes still resolve at the router level via the dual-scope admin emission, so existing bookmarks and external links keep working (PR #552). - Dependency bumps:
ecto3.13.6 → 3.14.0,ecto_sql3.13.5 → 3.14.0,fresco0.5.0 → 0.5.2,hammer7.3.0 → 7.4.0.
Fixed
- Publishing sitemap honors
default_language_no_prefixfor the primary language. Previously the sitemap always emitted/en/blog/postin multilang mode regardless of the setting, drifting away from the URLs publishing actually served at request time (PR #552). Languages.default_language_no_prefix?/0docstring no longer references the nonexistentPhoenixKit.Migration.migrate_default_language_no_prefix/0— points at the real entry pointmigrate_legacy/0.Routes.admin_path/2## Examplesno longer mixes setting-dependent cases with deterministic ones insideiex>doctest prompts, so addingdoctest PhoenixKit.Utils.Routeslater won’t fail. Setting-dependent shapes are still shown, just outside the executable doctest block.
PhoenixKit 1.7.115. Install or update: {:phoenix_kit, "~> 1.7"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.