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:
@@ -1,29 +1,4 @@
|
||||
---
|
||||
import BaseLayout from '../layouts/BaseLayout.astro';
|
||||
import Header from '../components/Header.astro';
|
||||
import Hero from '../components/Hero.astro';
|
||||
import Services from '../components/Services.astro';
|
||||
import Testimonials from '../components/Testimonials.astro';
|
||||
import CTA from '../components/CTA.astro';
|
||||
import Footer from '../components/Footer.astro';
|
||||
import { t } from '../utils/i18n';
|
||||
|
||||
const pageTitle = t('meta.title');
|
||||
const pageDescription = t('meta.description');
|
||||
const pageKeywords = t('meta.keywords');
|
||||
---
|
||||
|
||||
<BaseLayout
|
||||
title={pageTitle}
|
||||
description={pageDescription}
|
||||
keywords={pageKeywords}
|
||||
>
|
||||
<Header />
|
||||
<main>
|
||||
<Hero />
|
||||
<Services />
|
||||
<Testimonials />
|
||||
<CTA />
|
||||
</main>
|
||||
<Footer />
|
||||
</BaseLayout>
|
||||
// Redirect to English version
|
||||
return Astro.redirect('/en');
|
||||
---
|
Reference in New Issue
Block a user