Next.js Discord

Discord Forum

App directory: Path in root layout

Unanswered
Chalcid wasp posted this in #help-forum
Open in Discord
Chalcid waspOP
Hi all. Is it possible to get the request path from the root layout. I want to set the html lang attribute to "en" if the url path starts with "/en/" else fallback to "nb", my defauly language. Is this possible? If not, how can I set the html lang attribute dynamically on my multilang site (App directory setup)?

0 Replies