Next.js Discord

Discord Forum

Nested layouts that each have <html> tag

Unanswered
British Shorthair posted this in #help-forum
Open in Discord
British ShorthairOP
Hi, my content is structured like this: / for the default language (german), and /en for english. There is a root layout.tsx file, which specifies that the language is german like so:
<html lang="de"></html>.
However, for all of the other URLs that go under /en, I want the language to be english <html lang="en"></html>. If I use nested layouts for this will I encounter a problem? Thanks in advance. EDIT: By using this folder structure: (german)/layout.tsx and /en/layout.tsx, there doesn't seem to be any conflict between the layouts. There are no errors in the console, and also by inspecting the page everything seems to be good in the markup.

0 Replies