Locale visibly switches on redirecting with statically generated pages
See original GitHub issueVersion
nuxt-i18n: 6.15.1 nuxt: 2.14.0
Nuxt configuration
mode:
- universal
Nuxt-i18n configuration
i18n: {
locales: ['fr', 'en'],
defaultLocale: 'fr',
detectBrowserLanguage: {
useCookie: false,
onlyOnRoot: true
},
vueI18n: {
fallbackLocale: 'en',
}
}
Reproduction Link
I tried to reproduce the bug on codesandbox (here) but it does only appear on my local and production environment (https://ç.dev). Note: if you want to see the bug on my production environment, set your Browser language to anything other than French.
Steps to reproduce
Install a default Static Nuxt site + the module with above configuration.
What is Expected?
The redirect to the english version of the site should be triggered before the french version of the site loads.
What is actually happening?
The french version of the site load for a brief moment, then it is switched to the english version. This cause content to “jump” quickly when the domain loads. Visit my production website to see the bug.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:23
Top Results From Across the Web
Locale visibly switches on redirecting with statically generated ...
Reproduction Link. I tried to reproduce the bug on codesandbox (here) but it does only appear on my local and production environment Note: ......
Read more >Static HTML Export with i18n compatibility in Next.js - DEV ...
Create a [locale] folder inside your pages directory. a) Move all your pages files to that folder (not _app.js or _document.js etc..).
Read more >The complete guide to internationalization in Next.js
Learn how to make your Next.js app international with smooth translation features in this advanced, step-by-step tutorial.
Read more >Dynamic Rendering | Google Search Central | Documentation
Implement dynamic rendering ... Dynamic rendering is a workaround and not a long-term solution for problems with JavaScript-generated content in search engines.
Read more >Next.js server side redirection overrides the locale
Client side redirecting with router.push or router.replace is working fine and returning the correct urls. To my understanding I can't get the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello, did somebody find a solution for that issue? It’s a huge cost of TTI, which mean cost of customers 😃.
Since there is no way to fix that, I’ll close it.