Astro i18n setup
Turn a new-website scaffold into a turnkey multi-language site.
Safety check
- Script runs other programs or code: references/i18n.spec.ts line 57
An automated scan lowers risk but cannot promise zero risk. How we check skills
Preview
The first lines of SKILL.md
---
name: astro-i18n-setup
description: >
Turn a new-website scaffold into a turnkey multi-language site: Astro i18n
routing (clean default locale + prefixed others), self-referencing hreflang +
x-default in the Base layout, i18n sitemap alternates, a language switcher, and
the test-harness changes that keep the green-from-commit-1 gate honest across
locales. Run at scaffold time when new-website Q4 = "two+ languages at launch", OR
later to add a second language to a single-locale site whose default stays unprefixed
(phased rollout). Trigger phrases: "multi-language site", "add i18n", "DE+EN site",
"internationalization", "hreflang setup", "two languages at launch".
---
# Astro i18n setup (scaffold-time, opt-in)
Wires turnkey internationalization into the `new-website` Astro overlay. **Opt-in:**
the default scaffold stays single-locale. Run it either **at scaffold time** for a
2+-language launch (new-website §1 Q4), **or later** when you add a second language to
an existing single-locale site — see **Phased rollout** below.
Safe vs unsafe: because the default locale stays **unprefixed** (`/`, not `/en/`), adding
a *secondary* prefixed locale (`/de/…`) is purely additive — it never moves an existing
URL. What DOES break links/SEO is moving the **default locale itself** off `/` (e.g.
retrofitting `/` → `/en/`); this skill never does that, so keep `prefixDefaultLocale:
false`. A full re-prefixing of the default is a migration, not this skill.
Routing model (house default): **clean default locale, prefixed others** —
`/` and `/about` are the default language (marked `x-default`); other languages get
a prefix (`/de/`, `/de/about`). `prefixDefaultLocale: false`. This keeps the
default-locale URLs identical to a single-locale build, so nothing regresses.
Deep SEO rules (reciprocity, x-default, canonical-vs-hreflang, sitemap structure,
"translate the whole page not just chrome") live in
`seo-audit/references/international-seo.md` — read it, don't re-derive it.
## Phased rollout (primary language first, translate later)
You don't have to translate everything before launch. Because the default locale is
unprefixed, you can build and ship the **primary language first**, then add the second
locale when the translations are ready — without moving a single existing URL:
...From karero's repository, MIT licence.
Related skills
-
Checked
Website cloner
Rebuilds an existing web page as working local code that matches its content, assets, layout and interactions.
8/101 credit -
Checked
Immersive website design
Designs immersive, award level websites with bold type, scroll storytelling and purposeful motion.
7/101 credit -
Checked
Website structure planner
Plans the pages your site needs, its navigation, URLs and internal links, including for site migrations.
7/101 credit -
Checked
Sitemap and URL planner
Maps your pages, menus, URLs and internal links into one plan, so visitors and search engines find every page.
7/101 credit -
Checked
Netlify forms setup
Adds contact, signup and upload forms to a Netlify site with no backend, and fixes lost or spammed entries.
9/101 credit -
Checked
Web design builder
Builds polished web pages, dashboards and prototypes in HTML, CSS and React, then checks them in a browser.
8/101 credit