Translation guide
This site exists in Dutch, French and English. This page explains how the translations fit together, so you can maintain them without breaking the structure.
How the languages are stored
Every page has one file per language, in the same folder:
content/sessions/python/01-catch-the-stars/_index.md ← Dutch (default language)
content/sessions/python/01-catch-the-stars/_index.en.md ← English
content/sessions/python/01-catch-the-stars/_index.fr.md ← French- Dutch lives on the root (
/sessions/...), French and English under/fr/and/en/with the same path. - If a translation is missing, the language switcher still shows that language, but takes you to the home page of that language. So there is never a dead link.
- Adding a new page? Create the three files straight away.
title,weight,hiddenanddescriptionbelong in every language;weightandhiddenstay identical.
What you don’t translate
- Code identifiers (
basket,star,ship,score) stay English, because they live in the Python file. - File names (
star.png,boom.wav,starter.zip) stay language-neutral. - Product names: Pygame, Pgzéro/Pgzero, Thonny, PyCharm, VS Code, uv, Python, Git, GitHub, pygbag.
- Dojo terms we use as loanwords: ninja, coach, dojo, cheatsheet, cliffhanger, starter, checkpoint, Dojo Defender.
What you do translate
- All prose text, headings, titles and
descriptionfields. - Comments and docstrings in code blocks; identifiers and strings the program really needs stay as they are.
- Labels of the interactive demos (sliders, canvas texts).
- Coach notes and the “take it home” suggestions.
Fixed terms
| Dutch | English | French |
|---|---|---|
| sessie | session | session |
| uitdaging | challenge | défi |
| werkblad | worksheet | fiche de travail |
| oplossing | solution | solution |
| bronnen | resources | ressources |
| installeren | setup | installation |
| coach-notities | coach notes | notes du coach |
| Wat je vandaag leert | What you’ll learn today | Ce que tu vas apprendre aujourd’hui |
| Neem mee naar huis | Take it home | À emporter chez toi |
| Vastgelopen? | Stuck? | Bloqué ? |
| Tot de volgende keer! | See you next time! | À la prochaine ! |
Tone: Dutch uses “je”, English uses “you”, French uses “tu” (tutoiement) — the texts are for ninjas between 10 and 17 years old.
Links and downloads
- Links to other pages use
{{% relref "/sessions/python/01-catch-the-stars" %}}, so they automatically follow the right language. - Links to files in
static/(images, demo JS, ZIPs) are absolute and language-neutral. - ZIPs with code exist per language:
starter.zip(Dutch),starter.en.zipandstarter.fr.zip. Every language page links to its own ZIP. Asset packs without code (images.zip,fruits.zip) have no language variant.
Code per language
The source code lives in code/. Comments are Dutch; the translations sit
as main.en.py and main.fr.py next to the original. When the
ZIPs are built, <naam>.<taal>.py is renamed to <naam>.py and the
variants of the other languages are dropped. make zips takes care of that.
Interactive demos
Every demo JS in static/sessions/ has a STRINGS table at the top with
Dutch, English and French. The language comes from the lang attribute of
the page; without a table or with an unknown language the demo falls back to Dutch.
Check before you push
make buildThe build fails on a broken relref. Then go through the three languages of
the changed page: title, headings, links and downloads have to work the same
in all three.