Simple and powerful internationalization for Astro
A type-safe i18n solution inspired by next-intl, designed specifically for Astro projects.
npm install astro-intl ---
import { getTranslations } from 'astro-intl';
const t = getTranslations();
---
<h1>{t('welcome')}</h1>
<p>{t('hero.subtitle')}</p>{
"welcome": "Welcome to astro-intl",
"hero": {
"subtitle": "Type-safe i18n for Astro"
}
}<h1>Welcome to astro-intl</h1>
<p>Type-safe i18n for Astro</p>Everything you need for internationalization
Access translations anywhere without passing locale through components
Full TypeScript support with autocomplete for translation keys
Messages are loaded only when needed, optimizing bundle size
Organize translations by categories for better maintainability
Interpolate HTML or React components directly in translations
Intuitive API inspired by next-intl, easy to learn and use
Add astro-intl to your project in minutes and start serving users in their language.
Get Started