Add internationalization support with astro-i18next integration
- Implemented astro-i18next for multi-language support, including English, Dutch, and Italian. - Configured default locale and language fallback settings. - Defined routes for localized content in the configuration. - Updated package.json and package-lock.json to include new dependencies for i18next and related plugins.
This commit is contained in:
32
src/pages/nl/about.astro
Normal file
32
src/pages/nl/about.astro
Normal file
@@ -0,0 +1,32 @@
|
||||
---
|
||||
import BaseLayout from "../../layouts/BaseLayout.astro";
|
||||
import Header from "../../components/Header.astro";
|
||||
import Footer from "../../components/Footer.astro";
|
||||
import CTA from "../../components/CTA.astro";
|
||||
import { Trans } from "astro-i18next/components";
|
||||
import i18next from "i18next";
|
||||
|
||||
// Initialize i18next for this page
|
||||
await i18next.changeLanguage("nl");
|
||||
---
|
||||
|
||||
<BaseLayout
|
||||
title={`${i18next.t("nav.about")} | ${i18next.t("meta.title")}`}
|
||||
description={i18next.t("meta.description")}
|
||||
keywords={i18next.t("meta.keywords")}
|
||||
>
|
||||
<Header />
|
||||
<main>
|
||||
<section class="py-20">
|
||||
<div class="container-custom">
|
||||
<h1 class="text-4xl font-bold mb-8">{i18next.t("about.title")}</h1>
|
||||
<div class="prose prose-lg">
|
||||
<p>{i18next.t("about.description")}</p>
|
||||
<p>{i18next.t("about.mission")}</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<CTA />
|
||||
</main>
|
||||
<Footer />
|
||||
</BaseLayout>
|
Reference in New Issue
Block a user