Simple and powerful internationalization for Astro
A type-safe i18n solution inspired by next-intl, designed specifically for Astro projects.
npx astro add astro-intlpnpm astro add astro-intlyarn astro add astro-intl¡Qué lo que!
Countries where the language is official or spoken by a majority
Open the message file and compare its value with the rendered page.
---
import { getTranslations } from 'astro-intl';
const t = getTranslations();
---
<h1>{t('welcome')}</h1>{
"welcome": "Hello there!"
}<h1>Hello there!</h1>Everything you need for internationalization
Read the page’s locale in server-rendered components. Pass translated labels to interactive islands.
Get autocomplete for translation keys from a typed catalog.
Configure your message loader to import a catalog when its locale is requested.
Organize translations by categories for better maintainability
Use message tags for bold text and links. Each adapter renders them in the order set by the translation.
Intuitive API inspired by next-intl, easy to learn and use
Use your Astro project’s translations in .astro, React, Preact, Svelte, Vue, and SolidJS components.
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