Replies: 1 comment
-
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.
-
So I'm using NextJS "15.0.2", and this is my project structure:-
I want the ability to set the locale (apply the configuration of user selected locale from the database into the layout.tsx), what I mean by that is right at the moment when the user is loggedIn, I want to allow to get the locale and apply it in the (UI) immediately, I have my project setup correctly following the docs, but at the moment in my current setup, after I sign in, the user will need to hard-reload for their selected locale (from the database) to be applied!
These is my configurations:-
The > src/app/layout.tsx works when the user signs in, and it does apply the correct lang={} and dir={} in here correctly:-
<html lang={locale} dir={locale === 'en' ? 'ltr' : 'rtl'}>...
But I'm not sure why or HOW I'm suppose to apply the locale in my app.
For more context of my project please checkout the repo:-
https://github.com/MHMDHIDR/crm
Beta Was this translation helpful? Give feedback.
All reactions