detectBrowserLanguage
doesn't work with defaultLocale - probably prefix_except_default
or a cookie issue
#3386
Labels
Environment
Windows_NT
v22.11.0
3.15.2
3.20.0
2.10.4
[email protected]
-
modules
,components
,app
,runtimeConfig
,devServer
,compatibilityDate
,typescript
,hooks
,eslint
,i18n
@alo-komak/[email protected]
,@alo-komak/[email protected]
,@vee-validate/[email protected]
,@nuxt/[email protected]
,@nuxt/[email protected]
,@pinia/[email protected]
,@nuxtjs/[email protected]
-
Reproduction
https://stackblitz.com/edit/nuxt-starter-5gvqro5j?file=nuxt.config.ts
Describe the bug
detectBrowserLanguage
doesn't work for the defaultLocale. It works for any other locales. The issue I noticed is that changing the locale usingswitchLocalePath()
changes the cookie value. Still, not for the default one, so each time it gets redirected to the last locale set in cookies unless you change the cookie and change the URL to the default locale by yourself. The only solution I found for this issue is to ignore the use of cookies and setting the wholedetectBrowserLanguage
to falseAdditional context
No response
Logs
The text was updated successfully, but these errors were encountered: