-
-
Notifications
You must be signed in to change notification settings - Fork 478
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
Problem with server side rendering & browser language redirection? #1888
Comments
Thank you for your reporting! |
Hey @kazupon have you been able to work on this one? It's the only non-working feature I have at the moment, would love to see |
@lukaszflorczak |
@kazupon I upgraded |
hmm... 🤔 |
Ok, so I'll try it once again, locally. I let you know about the result soon. |
I tested locally and the problem doesn't exist anymore. |
Just checked that and it does work in development mode ( |
Environment
Darwin
v19.6.1
3.2.2
2.2.2
pnpm@7.27.1
vite
modules
,i18n
@nuxtjs/i18n@8.0.0-beta.10
-
i18n config
Reproduction
https://stackblitz.com/edit/nuxt-starter-f5us62?file=app.vue
Describe the bug
I found a very weird problem when the
detectBrowserLanguage
with thealwaysRedirect
option is active.My browser language is
PL
. The default app language is set toEN
. When I visit the page I have problems with two things:EN
(US) – the value from the server side. I have to addv-if="isMounted"
to render the proper value.key
doesn't help.The first one shows the
EN
(US) flag, and the second one shows the properPL
flag:v-html
.The first one shows an English translation, the second one – Polish (proper):
It looks like the reactivity is lost, but if I change the language manually with the button and
setLocale()
, everything returns to normal.Preview
Nagranie.z.ekranu.2023-02-23.o.14.04.27.mov
The text was updated successfully, but these errors were encountered: