Simple and powerful internationalization for Astro
A type-safe i18n solution inspired by next-intl, designed specifically for Astro projects.
npm install astro-intl pnpm add astro-intl yarn add 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
Use astro-intl with your favorite UI framework
Tell us about your project and share your experience with the library. Your feedback helps us improve and gives confidence to other developers.
What kind of project are you building with astro-intl?
What did you like most about the integration and API?
Any feature request or improvement you'd love to see?
Add astro-intl to your project in minutes and start serving users in their language.
Get Started