This skill documents practical steps and best practices for adding internationalization to Astro sites. It explains how to configure locale routing, set default locales and routing strategies, generate locale-aware links with helper functions (getRelativeLocaleUrl/getAbsoluteLocaleUrl), and integrate hreflang in sitemaps for SEO. The guidance covers organizing translated content using Content Collections and handling runtime locale with Astro.currentLocale.
Use this skill when building or auditing a multilingual Astro website: initial i18n setup, migrating existing routes to locale-prefixed URLs, adding hreflang support for search engines, or when implementing locale-aware link generation and fallbacks. It's also useful when standardizing translation file structure across a codebase.
Best used by Claude Code or other Claude/GPT-style code agents that can read project files and modify Astro config and templates. It assumes access to the codebase and build/test tooling to validate routing and sitemap output.
This skill has not been reviewed by our automated audit pipeline yet.