personal-website/src/pages/index.astro
Blboun3 fbd130eb8b
Finally structure for the project
Language versions, translations in separate files.
2024-03-25 14:41:07 +01:00

19 lines
461 B
Plaintext

---
import { getLocaleByPath } from "astro:i18n";
import MainLayout from "../layouts/MainLayout.astro";
// Don't remove - redirects user to language version for the preffered language
if (Astro.preferredLocale) {
return Astro.redirect(`/${Astro.preferredLocale}/`);
}
---
<MainLayout title="sitetitle" description="sitedescription" lang="en">
<h1>Welcome</h1>
<p>
"homeP1"
{Astro.url.toString()}
{getLocaleByPath("en")}
</p>
</MainLayout>