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

detectBrowserLocale is not working #2129

Closed
huang-julien opened this issue Jun 1, 2023 · 2 comments · Fixed by #2164 or #2276
Closed

detectBrowserLocale is not working #2129

huang-julien opened this issue Jun 1, 2023 · 2 comments · Fixed by #2164 or #2276
Labels
browser language detection ❗ p4-important Priority 4: bugs that violate documented behavior, or significantly impact perf v8

Comments

@huang-julien
Copy link
Contributor

huang-julien commented Jun 1, 2023

Environment

Operating System: Windows_NT
Node Version: v16.20.0
Nuxt Version: 3.5.2
Nitro Version: 2.4.1
Package Manager: yarn@1.22.19
Builder: vite
User Config: -
Runtime Modules: -
Build Modules: -

Reproduction

https://stackblitz.com/edit/nuxt-starter-ee43ob?file=package.json,nuxt.config.ts,i18n.config.ts,pages%2Findex.vue,mod%2Fprefix.ts,package-lock.json

Describe the bug

It seems that i18n_redirected cookie isn't set

Additional context

cc @ineshbose

Logs

No response

@ineshbose ineshbose changed the title detectBrowserLocale is not working #21299 detectBrowserLocale is not working Jun 1, 2023
@ineshbose ineshbose added the v8 label Jun 1, 2023
@huang-julien
Copy link
Contributor Author

Wrokaround:

const redirectLocale = useCookie('i18n_redirected')
````

watch the locale change and set the value to the cookie by yourself

@kazupon kazupon added ❗ p4-important Priority 4: bugs that violate documented behavior, or significantly impact perf browser language detection and removed pending triage labels Jun 6, 2023 — with Volta.net
Copy link
Collaborator

kazupon commented Jun 6, 2023

Thank you for your reporting!
Your reproduction code is really helpful for dectectBrowserLocale issue !
I seem we might be able to fix #1632

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser language detection ❗ p4-important Priority 4: bugs that violate documented behavior, or significantly impact perf v8
Projects
None yet
3 participants