Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cookie based locale detection is not respected in ssg mode #2996

Open
zumm opened this issue Jun 26, 2024 · 1 comment
Open

Cookie based locale detection is not respected in ssg mode #2996

zumm opened this issue Jun 26, 2024 · 1 comment
Labels
cookie help wanted locale 🔨 p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage PR Welcome v8

Comments

@zumm
Copy link

zumm commented Jun 26, 2024

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: [email protected]
  • Builder: -
  • User Config: css, ssr, app, devtools, runtimeConfig, build, vite, modules, imports, plugins, sourcemap
  • Runtime Modules: @pinia/[email protected], [email protected], (), @nuxtjs/[email protected]
  • 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

@kazupon kazupon added v8 cookie locale help wanted 🔨 p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage PR Welcome and removed pending triage labels Jun 28, 2024 — with Volta.net
@zumm
Copy link
Author

zumm commented Jun 28, 2024

Mb i could pr, but i need some guidance. I don't really understand why ssg needs special treatment in detectBrowserLanguage in first place. @kazupon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cookie help wanted locale 🔨 p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage PR Welcome v8
Projects
None yet
Development

No branches or pull requests

2 participants