diff --git a/README.md b/README.md index a63a102..32e72c3 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Visit the live site: [remybarranco.fr](https://remybarranco.fr) - Mathematical content support with KaTeX - Responsive design - Automatic asset optimization -- Internationalization support +- Internationalization support (`/en/` and `/fr/` URLs) - RSS feed generation - Sitemap generation - Automatic deployment via GitHub Actions @@ -123,6 +123,10 @@ Your content here... Add new projects as Markdown or MDX files in the `src/content/projects/` directory. +### Translations + +Pages are organized under `/[lang]/` where `lang` is `en` or `fr`. Strings are stored in `src/i18n/ui.ts`. Use the same keys for each language and retrieve them with `useTranslations(lang)` in your pages or components. To add a new translation, duplicate the content file with the `.fr.md` or `.en.md` suffix and set the `lang` frontmatter field. + ## 🤝 Contributing Contributions, issues, and feature requests are welcome! Feel free to check the issues page. diff --git a/src/components/Footer.astro b/src/components/Footer.astro index 125e90d..b47b37d 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -1,9 +1,13 @@ --- +import { useTranslations } from "../i18n/utils"; + +const { lang } = Astro.props; +const t = useTranslations(lang); const today = new Date(); ---