locales fetched from url in defineI18nLocale not working after nuxi generate #2156
Labels
locale
❗ p4-important
Priority 4: bugs that violate documented behavior, or significantly impact perf
spa
v8
Environment
Nuxi 3.5.3
Nuxt project info: 20:20:10
Reproduction
Because it's happens only on generated app, there's no reproduction. But I'll precisly describe the bug.
Describe the bug
While playing with the development environment, all the locales fetched by defineI18nLocale work fine. I can change my locale through switchLocalePath in my language menu, and the changes are propagated instantly. However, the problem arises with the generated build for static production when ssr: false is used. The default language of my page is not respected, and none of the options inside the language selector menu work. Manually adding a prefix to the URL also does not work. The app remains in English.
Here's my nuxt config:
Here's how my
defineI18nLocale
looks like:To sum up, everythings work great on dev, but not after nuxi generate/nuxi preview, it's like locales are not fetched during generate proces.
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: