We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b88d3f commit fecba55Copy full SHA for fecba55
2 files changed
packages/astro/src/core/render/context.ts
@@ -221,8 +221,10 @@ export function computeCurrentLocale(
221
): undefined | string {
222
const requestUrl = new URL(request.url);
223
for (const segment of requestUrl.pathname.split('/')) {
224
- if (locales.includes(segment)) {
225
- return segment;
+ for (const locale of locales) {
+ if (normalizeTheLocale(locale) === normalizeTheLocale(segment)) {
226
+ return locale;
227
+ }
228
}
229
230
if (routingStrategy === 'prefix-other-locales') {
packages/astro/test/i18-routing.test.js packages/astro/test/i18n-routing.test.jspackages/astro/test/i18-routing.test.js renamed to packages/astro/test/i18n-routing.test.js
0 commit comments