diff --git a/apps/frontend/src/plugins/i18n.ts b/apps/frontend/src/plugins/i18n.ts index e6e8fa0b0e..a0c4874bd9 100644 --- a/apps/frontend/src/plugins/i18n.ts +++ b/apps/frontend/src/plugins/i18n.ts @@ -201,7 +201,10 @@ export default defineNuxtPlugin({ locale.value = newLocale if (persist) { - useCookie('locale', { maxAge: 31536000, path: '/' }).value = newLocale + // Awaiting loadLocale above drops the Nuxt context on the server, where useCookie needs it + nuxtApp.runWithContext(() => { + useCookie('locale', { maxAge: 31536000, path: '/' }).value = newLocale + }) } }