- App Router: routes that start with a language code are no longer taken for a locale - with
localeInPath, the proxy matched the first path segment like anAccept-Languagevalue, which also accepts a prefix. WithsupportedLngs: ['en', 'it']a route like/it-jobscounted as the localeit, so it was served without a redirect andapp/[lng]gotlng = 'it-jobs'instead of/en/it-jobsbeing rendered (the same for/my-accountwithmysupported, and a referer like that could set the cookie). The first segment now counts as a locale only if it is a supported code or shaped like a language tag (a 2-3 letter language with an optional region such asen-gbores-419, or script and region such aszh-Hant-TW). A tag that resolves to a supported code is moved to that code:/en-gb/aboutredirects to/en/about, and withnonExplicitSupportedLngsand regional codes/en/aboutredirects to/en-US/about.hideDefaultLocalesends it to the clean URL, andlocaleInPath: 'internal'rewrites instead of redirecting. Anything else is a normal route and gets the locale prefix. Exact codes are served as before. Thanks @Pharex38 (#2352)