Multilingual Astro site: i18n without a plugin
One command per language. Your own language keeps every address it had, the others live under /de/, /fr/, /pl/. No plugin, no translation SaaS, no price per language.
BearMinion 1.27 can publish a site in more than one language. Your own language keeps every address it had; each other language gets its own prefix, like /de/ or /pl/.
Update first
Commit what you have, so git is your undo. Then check the site's own language in the editor's Site screen (the Language field, en if you never set it). Get this right before you add a second language: once there are two, changing it is a manual job.
npm install bearminion@latestAdd a language
One command per language:
npx bearminion add locale deIt checks the code against Node's language data and names the language, then:
- Declares your languages in
src/lib/content-model.ts, your own one first. - Copies the home page and the 404 page to
content/de/pages/as drafts. Nothing goes live yet. - Copies
src/i18n/en.jsontosrc/i18n/de.jsonfor the theme's own labels. - Updates the starter files that routing, the header, the footer and SEO need.
It stops before writing anything if the code is unknown, is already your language, or would clash with an address you have, such as a /de page or a content type called de. A starter file you changed yourself is reported as a conflict instead of being overwritten; --diff shows what it wanted to change.
Translate in the editor
Restart npm run dev. A language picker sits above the page: pick DE and you're on the German home page, or on the German version of the page you had open.

On any page, the Page tab has a Translations card:
- Add translation copies the page into the other language as a draft and links the two.
- Link existing… links a page you already wrote.
- Unlink takes a page out of the set.

A page doesn't have to exist in every language. A German-only page publishes under /de/ and simply isn't there in English. Translations are linked by a key in the JSON, not by slug, so /about can be /de/uber-uns and renaming either one doesn't break the link.
Site settings work the same way: switch to German and change the site name, header and footer links, SEO title and description, share image or cookie banner text. Only what differs is saved, in content/site.de.json. Colours, layout, analytics and indexing stay shared.
Publish when it reads right
Turn off draft on the German home page. A language whose home page is still a draft isn't published at all, so you can work on a whole language before anyone sees it.
Every page gets the right <html lang>. Linked pages point at each other with hreflang, and your own language also gets x-default. Pages without a translation get none, which is correct.
The sitemap
The commands never touch astro.config.ts. A site created from the 1.27 starter already lists alternates in its sitemap; an older one needs this in its sitemap() call, with both helpers imported from ./src/lib/sitemap:
sitemap({
filter: createSitemapFilter(routes),
...createSitemapAlternates(contentModel, routes, content.site.url),
})Turn the switcher on
Site → Language switcher, edited in your own language. It's off by default, and off only hides it: every language still builds, is reachable and is in the sitemap. That lets you send a client the German address before the switcher shows up for everyone.
When it's on, it sits at the end of the header (next to the Menu button on phones), lists each language whose home page is published, and goes to the linked translation if there is one, otherwise to that language's home page.

Clients editing online
The hosted editor draws and edits every language. Rebuild its deployment after add locale, because its code changed. In pull request mode each language gets its own branch, such as bearminion/page/de/about; adding or linking a translation touches two languages at once, so it goes into bearminion/translations and appears in the editor once that pull request is merged.
More in Locales.
Wake the minion.
Run one command, answer three boring questions and watch it do the rest. Template copied, dependencies installed, first commit done.
Now it gets out of your way so you can actually work.
- npm create bearminion@latest
- Created My Site in my-site
- Installed dependencies
- →Next: cd my-site, npm run dev
