Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Astro i18n Starter is a complete starter template for multilingual websites built with Astro, featuring URL localization and internationalization support.
Astro i18n Starter is a boilerplate for building multilingual Astro websites, implementing complete URL localization so each language gets its own SEO-friendly path (for example, English /about becomes Slovenian /sl/o-projektu).
Astro i18n Starter is a free, MIT-licensed starter template that gives you a working internationalization setup for Astro 7.1, using Svelte 5 for interactive components, Tailwind CSS for styling, and the Cloudflare adapter for on-demand rendering. It takes translation files, route mappings, and content collections as input, and produces a static site with localized URLs, a multilingual blog, pagination, and a localized contact form. The project is maintained under the GitHub repository Scorpio3310/astro-i18n-starter, with a live demo and documentation hosted at astro-i18n-starter.klemenc.dev.
src/i18n/routes.ts; dynamic routes map requests to localized slugs.src/locales/en and src/locales/sl, and content is loaded per language with type safety.PRODUCTION_DOMAIN is set.Web developers who want to launch a multilingual Astro site without building an i18n routing layer from scratch. Content teams who need a bilingual blog with separate URLs per language. Agencies that need SEO-friendly localized paths for clients. Also useful for teams exploring Svelte 5 integration inside Astro.
To start, clone the repository, run pnpm install, copy .env.example to .env, and set PRODUCTION_DOMAIN to your production URL. The URL localization system works by defining route names per language in src/i18n/routes.ts, then generating static paths with getStaticPaths that include the localized slug. Adding a new page involves creating an Astro file under src/pages/[your-route]/[...index].astro, adding route translations, adding locale files, and updating the navigation data.
Free and open source under the MIT License.
Yes. The starter uses the Cloudflare adapter for on-demand rendering of dynamic routes, but the documentation states you can use any other Astro adapter in its place.
English and Slovenian translation files are included, with route mappings for both. The structure supports adding more languages by creating locale files and route definitions.
The advanced features, including dynamic default language and optional language prefix, are maintained in the helper-based branch referenced in the repository README, not on the main branch.
PRODUCTION_DOMAIN used for?Setting PRODUCTION_DOMAIN in your environment enables robots.txt and controls Open Graph images, canonical URLs, and search engine indexing behavior in the generated site.
Yes, the project is licensed under the MIT License, so you can use it for commercial projects with attribution as required by MIT.
