nuxt-modules/i18n

Cookie based locale detection is not respected in ssg mode

開放

#2,996 建立於 2024年6月26日

 (1 則留言) (0 個反應) (0 位負責人)TypeScript (532 個分叉)github user discovery
PR Welcomehelp wantedscope: cookiesscope: locales🔨 p3-minor-bug

倉庫指標

星標
 (2,074 顆星)
PR 合併指標
 (平均合併 6天 10小時) (30 天內合併 74 個 PR)

描述

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

貢獻者指南