astro-i18n
Installation
SKILL.md
Astro i18n Skill
Purpose
Provides internationalization patterns for lead generation sites targeting multiple markets/languages. Implements URL-based routing (/en/, /de/, /fr/), translation management, SEO optimization with hreflang tags, and RTL support.
Core Rules
- URL structure first —
/en/,/de/,/fr/prefixes for SEO and user clarity - Fallback gracefully — Missing translations default to primary language with console warning
- hreflang tags — Required on every page for proper language alternates
- RTL support — Use logical CSS properties (margin-inline-start) for Arabic/Hebrew
- Persist preference — Store user's language choice in localStorage/cookie
- Type-safe translations — Use TypeScript for language codes and translation keys
- No hardcoded text — All user-facing strings must come from translation files
- SEO metadata — Translate title, description, og:locale for each language
- Content parity — Each language should have equivalent content structure
- Intl API formatting — Use native Intl for dates, numbers, currency per locale