Skip to content

Commit 703a03e

Browse files
committed
fix: lang属性を表示言語に応じて切り替え
1 parent 02c4844 commit 703a03e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

2025/src/layouts/Layout.astro

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
---
22
import { GoogleFontsOptimizer } from "astro-google-fonts-optimizer";
3+
4+
const { lang = 'ja' } = Astro.props;
35
---
46
<!DOCTYPE html>
5-
<html lang="ja">
7+
<html lang={lang}>
68
<head>
79
<meta charset="utf-8">
810
<meta name="viewport" content="width=device-width, initial-scale=1">

2025/src/pages/en.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Layout from '../layouts/Layout.astro';
33
import LanguagePicker from '../components/LanguagePicker.astro'
44
---
55

6-
<Layout>
6+
<Layout lang="en">
77
<header class="hero">
88
<LanguagePicker />
99
<div class="container">

0 commit comments

Comments
 (0)