Thanks for helping out with the Animated Java website!
You'll need Bun.
bun install
bun devThe site runs at http://localhost:5173.
Each doc page is a folder in src/docs, with one Markdown file per language:
src/docs/nodes/cubes/
├── en.md ← English (the source)
└── de.md ← German translation
Pages without a file for a language fall back to English, with a notice saying they aren't translated yet.
- Copy the page's
en.mdto<lang>.mdin the same folder, e.g.src/docs/nodes/cubes/de.md. - Translate the
titleanddescriptionin the frontmatter, then the page content. - Leave these as they are:
- Code blocks, commands, and function names.
- Link paths, e.g.
[Groups](/docs/nodes/groups). They automatically point to the same language, so only translate the link text. - Admonition and tree syntax (
:::tip,:::tree,:::). You can translate custom admonition titles, like:::warning[Before you get started].
- Links to a section (
/docs/nodes/groups#entity-creation) use the heading's text. If the target page is translated, update the#anchorto match its translated heading. - Check it at
http://localhost:5173/<lang>/docs/<page>, then open a pull request.
You don't need to translate every page at once. A pull request with a single page is welcome.
Currently supported languages: en, de, nl, ru, uk, zh-cn.
Want to translate into a language that isn't listed? Open an issue first so we can make sure someone can keep it up to date. Then:
- Add the language code to
SUPPORTED_LANGUAGESinsrc/lib/docs/docs.ts. Use a BCP 47 code in lowercase, likefrorpt-br. - Translate at least
src/docs/welcome, so the language has a starting page. - Open a pull request with both changes.
The language picker and the /<lang>/docs routes pick up the new language automatically.