Skip to content

Commit 35255f8

Browse files
committed
fix: match html lang and hreflang
1 parent 57d2e18 commit 35255f8

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/app/[language]/layout.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ export default async function LanguageLayout({
4343
const currentLanguage = language || defaultLanguage
4444

4545
return (
46-
<RootProvider i18n={provider(currentLanguage)}>{children}</RootProvider>
46+
<html lang={currentLanguage} suppressHydrationWarning>
47+
<body>
48+
<RootProvider i18n={provider(currentLanguage)}>{children}</RootProvider>
49+
</body>
50+
</html>
4751
)
4852
}

src/app/layout.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ export function generateStaticParams() {
104104

105105
export default function RootLayout({ children }: { children: ReactNode }) {
106106
return (
107-
<html lang="en" suppressHydrationWarning>
107+
// biome-ignore lint/a11y/useHtmlLang: lang is set dynamically in [language]/layout.tsx
108+
<html suppressHydrationWarning>
108109
<head />
109110
<body className="flex flex-col min-h-screen">
110111
<RootProvider i18n={provider('en')}>

0 commit comments

Comments
 (0)