i18n init
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user