diff --git a/packages/astro/src/core/render/context.ts b/packages/astro/src/core/render/context.ts index 964652315e6f9..60c9c27d78e07 100644 --- a/packages/astro/src/core/render/context.ts +++ b/packages/astro/src/core/render/context.ts @@ -228,7 +228,7 @@ export function computeCurrentLocale( } } } - if (routingStrategy === 'prefix-other-locales') { + if (routingStrategy === 'prefix-other-locales' || routingStrategy === 'domain') { return defaultLocale; } return undefined; diff --git a/packages/astro/test/fixtures/i18n-routing/src/pages/dynamic/[id].astro b/packages/astro/test/fixtures/i18n-routing/src/pages/dynamic/[id].astro index 58141fec05ce1..4b0a97b6eed54 100644 --- a/packages/astro/test/fixtures/i18n-routing/src/pages/dynamic/[id].astro +++ b/packages/astro/test/fixtures/i18n-routing/src/pages/dynamic/[id].astro @@ -2,7 +2,7 @@ --- export function getStaticPaths() { return [ - { id: "lorem" } + { params: {id: "lorem"}} ] } const currentLocale = Astro.currentLocale;