nuxt-modules/i18n
Cookie based locale detection is not respected in ssg mode
Open
#2,996 opened on Jun 26, 2024
PR Welcomehelp wantedscope: cookiesscope: locales🔨 p3-minor-bug
Repository metrics
- Stars
- (2,074 stars)
- PR merge metrics
- (Avg merge 6d 10h) (74 merged PRs in 30d)
Description
Environment
- Operating System: Windows_NT
- Node Version: v18.16.0
- Nuxt Version: 3.12.2
- CLI Version: 3.12.0
- Nitro Version: 2.9.6
- Package Manager: yarn@1.22.22
- Builder: -
- User Config: css, ssr, app, devtools, runtimeConfig, build, vite, modules, imports, plugins, sourcemap
- Runtime Modules: @pinia/nuxt@0.5.1, nuxt-icon@0.6.10, (), @nuxtjs/i18n@8.3.1
- Build Modules: -
Reproduction
https://stackblitz.com/edit/nuxt-starter-bnxebz?file=app.vue
npm run generate npx serve .output/public
Change locale by pressing button and reload page. Locale resets to default.
Describe the bug
When using cookie based locale detection (cookie + no prefix strategy) and ssg at same time cookie is not respected. Everything works fine in not ssg mode tho.
Additional context
No response
Logs
No response