astro-i18n

Implement URL-based localization and translation workflows for Astro sites.

4|1|Updated Dec 21, 2025
One-click install
npx skills add https://github.com/Soborbo/claudeskills --skill astro-i18n
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: astro-i18n
Source: https://github.com/Soborbo/claudeskills/tree/main/astro-i18n
Command: npx skills add https://github.com/Soborbo/claudeskills --skill astro-i18n

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the complexity of building multi-language Astro sites for lead-generation by providing a cohesive set of internationalization patterns and best practices that ensure consistent routing, translation management, and accessibility across markets.

Core Features & Use Cases

  • URL-based localization: Supports language-prefixed URLs like /en/, /de/, /fr/ for SEO and user clarity.
  • Translation workflow: Centralized translation files with a t() function for safe, fallback-capable lookups.
  • RTL & accessibility: RTL support with logical CSS properties and accessible language switches.

Quick Start

Deploy with a minimal setup: define languages, add translation JSONs, implement a [lang]-route structure, and wire a layout with hreflang. Then load the i18n utilities in pages and components.

Frequently Asked Questions about astro-i18n

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement multi-language routing in Astro?

Astro multi-language routing uses dynamic [lang]/ route structures to create language-prefixed URLs like /en/ or /de/. This setup ensures clear SEO localization and proper content delivery for different markets.

What is the best way to manage translations in an Astro site?

Managing translations in Astro is best handled through centralized translation JSON files paired with a t() utility function. This method provides safe, fallback-capable lookups to ensure content parity across all supported languages.

Does this Astro i18n approach support RTL languages and accessibility?

Yes, RTL languages are supported using logical CSS properties and accessible language switching components. This ensures proper rendering for right-to-left scripts while maintaining accessible navigation across localized content.

How do I add hreflang tags for SEO in a localized Astro project?

Hreflang SEO tags are integrated by wiring a shared layout with hreflang attributes for your active languages. Combined with URL-based localization, this signals page relationships to search engines and prevents duplicate content issues.

Can I use native Intl formatting for locale-specific dates and numbers in Astro?

Yes, locale formatting via Intl is used to ensure proper regional formatting of dates and numbers. This works alongside the translation workflow to maintain content parity and localized formatting across all language routes.