nuxt-modules/i18n

Cookie based locale detection is not respected in ssg mode

オープン

#2,996 opened on 2024/06/26

 (1 件のコメント) (0 件のリアクション) (0 人の担当者)TypeScript (532 件のフォーク)github user discovery
PR Welcomehelp wantedscope: cookiesscope: locales🔨 p3-minor-bug

Repository metrics

Stars
 (2,074 個のスター)
PR merge metrics
 (平均マージ 6d 10h) (30d で 74 merged PRs)

説明

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

コントリビューターガイド