Back to themes

Astro-i18n

A lightweight, typed i18n starter for Astro.


Cost

Free


Created by
BracoZS

Lightweight and type-safe i18n solution for Astro with multilingual routing, translations and interpolation support.

Use it as a reference implementation or copy the  'src/i18n'  module directly into your own project and extend it as needed.

The UI is intentionally minimal so the focus stays on the translation structure, routing, and type-safe interpolation.

It also includes helper functions for loading translations and interpolating values.


Features


  • Typed locale dictionaries with satisfies.
  • Central language registry.
  • Type-safe interpolation: TypeScript reports missing or extra placeholders when translations differ between locales.
  • Default language redirect from /.
  • Static routes generated from available translations.
  • Simple interpolation helper for values like {name}.