Astro Islands & SSR (50 Qs)•Part 2: Core Architecture & Implementation (Mid-Level)
Native Internationalization (i18n) in Astro.
senior LevelCode ExampleSystem DesignAstro
In Simple Words: Astro includes native multi-language routing:
javascript
// astro.config.mjs
export default defineConfig({
i18n: {
defaultLocale: 'en',
locales: ['en', 'es', 'fr', 'de'],
routing: { prefixDefaultLocale: false }
}
});
Automatically maps /es/about to Spanish templates with localized route helpers (getRelativeLocaleUrl()).