Weird Folder System solution
Answered
Kangal Shepherd Dog posted this in #help-forum
Kangal Shepherd DogOP
Hi, I have one folder structure problem that I have not been able to solve (App, no-typescript, i18n)
1) I need two different layouts for Admin and Website (different UIs)
2) Website is under dynamic [locale] folder
Problem:
- RootLayout has to be directly in /app folder
- In RootLayout, I dont yet have access to the [locale] param
- I cannot set <html lang={locale}>
1 solution is to move admin under [lang], but there has to be a better way, no? Because my dashboard is not internationalized
1) I need two different layouts for Admin and Website (different UIs)
2) Website is under dynamic [locale] folder
Problem:
- RootLayout has to be directly in /app folder
- In RootLayout, I dont yet have access to the [locale] param
- I cannot set <html lang={locale}>
1 solution is to move admin under [lang], but there has to be a better way, no? Because my dashboard is not internationalized
Answered by Birman
i think you can have two root layout, one for admin and another for [locale] where you have access to the locale variable, but that is gonna cause a full page refresh when you navigate from an admin page to the internationalized ones.
in case you want to go this way, you would have to delete app/layout.js
in case you want to go this way, you would have to delete app/layout.js
1 Reply
Birman
i think you can have two root layout, one for admin and another for [locale] where you have access to the locale variable, but that is gonna cause a full page refresh when you navigate from an admin page to the internationalized ones.
in case you want to go this way, you would have to delete app/layout.js
in case you want to go this way, you would have to delete app/layout.js
Answer