Next.js Discord

Discord Forum

Issue with localisation / Root Layout in subdir

Unanswered
Sloth bear posted this in #help-forum
Open in Discord
Sloth bearOP
Hello! Im trying to implement localization so i read the docs (https://nextjs.org/docs/app/building-your-application/routing/internationalization), implemented that but now when accessing the page i get the error lang]/page.tsx doesn't have a root layout. To fix this error, make sure every page has a root layout.. In the docs is stated The root layout can also be nested in the new folder (e.g. app/[lang]/layout.js). tho. When moving the layout to the base directory (src/app) the server crashes without a log in debugger.

0 Replies