Replies: 2 comments
-
You got any answer on this? |
Beta Was this translation helpful? Give feedback.
0 replies
-
So this is what you need : https://next-intl.dev/docs/routing#locale-cookie
folder structure for me is
|
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
I can't get them both to work at the same time (just to be clear, I'm not trying to implement something like "en.domain.com", I'm trying to get "app.domain.com/en" to work with i18n). I can easily make a subdomain work with middleware:
And I can easily use internationalization (i18n) routing on my main domain.
But the moment I try to use both, the main domain works great but the subdomain always serves a 404 and a "Unable to find
next-intl
locale because the middleware didn't run on this request. See https://next-intl-docs.vercel.app/docs/routing/middleware#unable-to-find-locale. ThenotFound()
function will be called as a result."No matter what, I've tried every path possible.
The log shows the correct path but a 404. It's like I can't have both.
Are there better ways to do this? Am I missing something? Has anyone tried this successfully? I'm probably doing something really dumb here but I'm just starting out with next.js, so please don't kill me. I'd just like to know how I could have i18n internationalization in subdomains in next.js 14. Thanks.
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions