Internationalization (i18n)
Introduction
This starter kit uses astro-i18n-aut for internationalization (i18n). To see how it works, check out the git commit (link for paid users only) that added this feature.
Adding locales
In both the astro.config.mjs
and src/lib/i18n.ts
files, modify the section below with the locales you want to support:
In src/components/LocaleSwitcher.astro
, modify this section with the languages you want to support:
Adding translations
In src/lib/i18n.ts
, you can add translations for each locale in the getI18n
function.
Afterwards, you can render the translations in your Astro files. See src/components/Navbar.astro
for an example of how to do this.
🚀 Congratulations on setting up internationalization!