Closed KuhlTime closed 9 months ago
Would you be able to provide a reproduction? 🙏
Here is my reproduction of this issue: https://stackblitz.com/edit/nuxt-starter-qzsswn
Thanks for the reproduction!
I was able to reproduce this rendering issue without i18n, I have changed your reproduction to demonstrate here. This means this is either a Nuxt or Vue SSR issue, so I recommend opening an issue there (or checking if an issue exists).
I'm closing this as it's not caused by this module, but let me know and/or reference this issue if you open an issue or find the source of it, I'm sure others will run into it as well and we may add any workarounds to the docs if it is a common issue!
Environment
Darwin
v20.8.1
3.10.2
3.10.1
2.8.1
bun@1.0.1
-
ssr
,devtools
,app
,modules
,css
,hooks
,i18n
@nuxt/devtools@1.0.8
,@nuxtjs/i18n@8.1.1
,@vueuse/nuxt@10.7.2
,@nuxt/image@1.3.0
,@pinia/nuxt@0.5.1
,@nuxtjs/color-mode@3.3.2
,unplugin-icons/nuxt
,@nuxtjs/tailwindcss@6.11.4
-
Reproduction
I am using SSR, and I am using the language switcher example from the docs. I have adapted the example to use a
<select>
element instead of<a>
links.nuxt.config.ts
LanguageSwitcher.vue
Describe the bug
I would expect the selector to immediately have the right value available on page load. Still, when I reload the page, the selector does not show the selected language. In the video below, I would expect the application to select "Deutsch" as the value gets set to be "de" on page load.
https://github.com/nuxt-modules/i18n/assets/6073956/d71d1db1-4f9e-47a4-9306-6e6a01715c81
As can be seen in the video, the value attribute is correctly set to "de" on page load.
Additional context
No response
Logs
No response