PhoenixKit 1.7.150: Language links to the home page lose the trailing slash
PhoenixKit 1.7.150 fixes the language switcher on a site’s home page. Its links to the home page in another language ended in a slash, such as /ru/, which a Phoenix router does not match, so visitors who were not signed in landed on a 404.
Routes.path("/", locale: "ru") now returns /ru. Every other address is built as before, and the standalone language switcher uses the same function.
Upgrading
PhoenixKit keeps the language in the address, not in a cookie or the session. To use these links, the host app needs its own /:locale route for the home page.
Full release notes: PhoenixKit 1.7.150
1.7.150 · 15 June 2026
Fixes locale-prefixed root URLs so anonymous visitors can switch language on a parent app’s /:locale landing page.
Fixed
Routes.path("/", locale: x)no longer emits a trailing slash. The locale-prefixed root was built as/{locale}/(e.g./ru/); Phoenix routers don’t match a trailing slash, so a parent app’s/:localelanding route 404’d and the language switcher’s link on/led nowhere for anonymous visitors. Core now emits/{locale}(e.g./ru) for the bare root while every other path is unchanged. The standaloneLanguageSwitcher.language_switcher_dropdownroutes through this primitive, so its anonymous-landing links resolve correctly. phoenix_kit keeps its URL-as-truth locale model (no session/cookie locale) — the parent app declares a/:localelanding and the switcher’s link now reaches it.
PhoenixKit 1.7.150. Install or update: {:phoenix_kit, "~> 1.7"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.