Skip to content

translation#4

Open
LukasRumi wants to merge 3 commits intomainfrom
multiple-languages
Open

translation#4
LukasRumi wants to merge 3 commits intomainfrom
multiple-languages

Conversation

@LukasRumi
Copy link
Collaborator

@LukasRumi LukasRumi commented May 6, 2025

https://github.com/yassinedoghri/astro-i18next#readme

Ich probiere diesem Guide hier zu folgen. komme aber nicht weiter. wie kann man unsere index.astro so anpassen, dass es funktioniert?

---
// src/pages/index.astro
import i18next, { t } from "i18next";
import { Trans, HeadHrefLangs } from "astro-i18next/components";
---

<html lang={i18next.language}>
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>{t("site.title")}</title>
    <meta name="description" content={t("site.description")} />
    <HeadHrefLangs />
  </head>
  <body>
    <h1>{t("home.title")}</h1>
    <p>
      <Trans i18nKey="home.subtitle">
        This is a <em>more complex</em> string to translate, mixed with <strong
          >html elements
        </strong> such as <a href="https://example.com/">a cool link</a>!
      </Trans>
    </p>
  </body>
</html>

@LukasRumi LukasRumi self-assigned this May 6, 2025
@LukasRumi LukasRumi requested a review from LukasWestholt May 6, 2025 16:09
@LukasWestholt
Copy link
Owner

Nice. Ich werde noch bisschen Zeit brauchen um mir das anzuschauen. Aber das hier hatte ich bereits gefunden: danielcgilibert/blog-template#43

@LukasRumi
Copy link
Collaborator Author

Derzeitiges Problem: Blog Einträge können noch nicht in Englisch und Deutsch unterschieden werden

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants