i18n init

This commit is contained in:
2025-06-22 07:24:36 +02:00
parent 0dcc1323bd
commit 7eb3a08b20
11 changed files with 627 additions and 50 deletions

View File

@@ -2,16 +2,23 @@
import "../styles/global.css";
import Head from "./Head.astro";
import Navigation from "../components/Navigation.astro";
import { getLanguageFromPath } from "../lib/i18n";
const { title = "Just a title", description = "Adescription" } = Astro.props;
// Get current language from URL
const currentLang = getLanguageFromPath(Astro.url.pathname);
---
<!doctype html>
<html lang="en">
<html lang={currentLang}>
<Head {title} {description} />
<body>
<Navigation />
<div class="container max-w-4xl mx-auto p-4">
<header class="bg-white shadow-sm">
<Navigation />
</header>
<main class="container max-w-4xl mx-auto p-4">
<slot />
</div>
</main>
</body>
</html>