How would one go about forcing a particular language for certain routes? #1138
Replies: 1 comment
-
The App Router mixed routing example (demo) seems somewhat related to your use case, maybe that can provide some inspiration. I guess the bigger question for me would be if you want i18n routing on the marketing site and/or the logged in app. If you don't need it for the logged in app, you can already solve providing a locale in |
Beta Was this translation helpful? Give feedback.
-
We have 2 different apps on our site, a marketing site in next-js, and a logged in site built in angular. The marketing site uses next-auth to determine the language. The dashboard stores the users language in their user settings (in our database).
We are starting to use more logged in functionality into the next app, and need to determine how to have consistency, so logged in users always see the language they have set in their user settings.
My initial idea is to store the locale on the jwt authentication token and check that in our middleware, then force the locale there using rewrites, but I have not thought this through too much. Anybody dealt with something similar or have any thoughts?
Beta Was this translation helpful? Give feedback.
All reactions