Can I change the default locale and locales in my i18n.js config dynamically? #839
Unanswered
BozhidarPeychevOSF
asked this question in
Q&A
Replies: 1 comment 1 reply
-
what is the use case? This configuration is part of the Next.js core: https://nextjs.org/docs/advanced-features/i18n-routing, maybe you can use domains: [
{
domain: 'example.com',
defaultLocale: 'en-US',
},
{
domain: 'example.nl',
defaultLocale: 'nl-NL',
},
{
domain: 'example.fr',
defaultLocale: 'fr',
// an optional http field can also be used to test
// locale domains locally with http instead of https
http: true,
},
], |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey guys, currently I'm facing a problem that would be resolved simply by being able to change the config dynamically. This is due to the fact that in our project we have multiple domains with different allowed locales, locales and default locales. Since in some of them the default locale is the same I cannot rely on the domains property inside the config or in the next.config.js config.
My question is if there is an option to change the locales and the defaultLocale properties dynamically inside of the config files or whether you might have any suggestions to handle the aforementioned case?
Beta Was this translation helpful? Give feedback.
All reactions