Skip to content

Commit 2113a25

Browse files
committed
✨ Make lang configurable in Layout
1 parent 347fc0a commit 2113a25

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

src/blocks/Layout/Layout.astro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ interface Props extends LayoutProps {}
1010
1111
const {
1212
seo,
13+
lang = 'en',
1314
menu,
1415
footer,
1516
className,
@@ -28,7 +29,7 @@ const containerClasses = [
2829
---
2930

3031
<!doctype html>
31-
<html lang="en">
32+
<html lang={lang}>
3233
<head>
3334
<SEO {...seo} />
3435
</head>

src/blocks/Layout/Layout.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
1111
const {
1212
seo,
13+
lang = 'en',
1314
menu,
1415
footer,
1516
className,
@@ -33,7 +34,7 @@
3334
])
3435
</script>
3536

36-
<html lang="en">
37+
<html lang={lang}>
3738
<!-- eslint-disable-next-line svelte/no-raw-special-elements -->
3839
<head>
3940
<SEO {...seo} />

src/blocks/Layout/Layout.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import './layout.scss'
99

1010
const Layout = ({
1111
seo,
12+
lang = 'lang',
1213
menu,
1314
footer,
1415
className,
@@ -31,7 +32,7 @@ const Layout = ({
3132
])
3233

3334
return (
34-
<html lang="en">
35+
<html lang={lang}>
3536
<head>
3637
<SEO {...seo} />
3738
</head>

src/blocks/Layout/layout.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import type { SEOProps } from '@blocks/SEO/SEO.ts'
55

66
export type LayoutProps = {
77
seo: SEOProps
8+
lang?: string
89
menu?: MenuProps
910
footer?: FooterProps
1011
className?: string

0 commit comments

Comments
 (0)