-
-
Notifications
You must be signed in to change notification settings - Fork 483
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
Chosen locale is loading a different locale file that is set in object #2803
Comments
hey @BobbieGoede do you know if there is any room on the roadmap to examine this? I can try and find some time to help debug if that's any use. It's a blocker for myself to move an application from Nuct 2 to Nuxt 3 as we are mid migration. If its going to be a while I might try and find an alternative temporary solution (manually building one json per country) so I can keep on working through. Many thanks! |
@nford88 I do have a workaround using dynamic locale files which is less performant but should unblock your migration while this issue exists. I have updated your reproduction to demonstrate the workaround here. |
I implemented your workaround now. I have about 150 translations in the main language files and approximately 20-30 in the locale country files. Not seeing too much of a performant dip. Will see how it goes. Thanks! |
This will be resolved with #3137 since I've fixed the issue upstream! Here's an updated reproduction with using a preview release https://stackblitz.com/edit/nuxt-starter-mwtgfw?file=package.json. |
Environment
Reproduction
https://stackblitz.com/edit/nuxt-starter-ymkpzl?file=nuxt.config.ts
Describe the bug
My site have multiple locales which are language and country specific. For this example, I create one main language file (de.json) which majority of translations, I then create one specific country file (de-CH.json). Both are inserted as locale objects below.
However, the 'de-DE' locale is accessing the translations from 'de-CH.json' file when that locale should only being 'de.json' file.
There seems to be an issue with the spreading of the locale objects json files and both locales are receiving the same translations object when they should have their own be separate objects.
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: