How does Next >= 13 detect locale? Can't get locale to switch depending on domain, using next-translate #47673
Unanswered
PhilipAngelinNE
asked this question in
Help
Replies: 1 comment
-
|
To put is very shortly; how come when I am on a |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
My team built a bunch of Next 12 apps with next-translate, all went smoothly. We don't use language slugs in the path or anything. Rather we let Next handle it, which I can only assume it did by the domain. We have a
.seand.dedomain respectively for this frontend, one for each tenant.As far as I know we didn't do anything manually. We have no
i18nin those Next apps' configs or anything. We pretty much just let Next handle it out of the box.But ever since making the first Next >= 13 app recently, I noticed that the locale is hard stuck on "sv" regardless of which domain I visit. I even tried adding the
i18nportion, including the domains array, in Next the config but no.The
defaultLocalethat I provide to next-translate is the one it'll be stuck on. I tried manually setting my client Accept-Language header to "en", "sv", and "de" respectively, but Next kept sticking to the defaultLocale set in the next-translate config. I have tried switching the localeDetection to true and back as well, it doesn't budge.Here is the Next config:
And here is the i18n config for next-translate:
We do use Nx as a monorepo to serve our apps. Nx version is 15.8.6.
next-translate version: 2.0.2
Next version: 13.1.1
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions