Installation
Install astro-intl using your preferred package manager.
✅ Astro v6 Compatible
astro-intl v2.2.0 adds <code>t.raw()</code> for raw values, <code>messagesDir</code> for simplified JSON loading, <code>AutoRedirect</code> component, and auto-detection of locale in static mode. Fully supports Astro 4, 5, and 6.
$
npm install astro-intl
$
pnpm add astro-intl
$
yarn add astro-intl Optionally register the integration in your astro.config.mjs:
astro.config.mjs
import { defineConfig } from 'astro/config';
import astroIntl from 'astro-intl';
export default defineConfig({
integrations: [astroIntl()],
}); The integration is optional — it only logs a startup message. The core API works without it.