Internationalization (i18n) Guide¶
Memory Bank ships locale-aware .memory-bank/ template bundles. The skill
defaults to English, but every user can install and initialize a bank in their
preferred language.
Supported locales (v3.1.1):
| Code | Status | Notes |
|---|---|---|
en |
✅ Full | Source of truth |
ru |
✅ Full | Complete Russian translation |
es |
🚧 Scaffold | EN copy + TODO(i18n-es) banner — PRs welcome |
zh |
🚧 Scaffold | EN copy + TODO(i18n-zh) banner — PRs welcome |
What is localized¶
templates/locales/<lang>/.memory-bank/*.md— the 7 core files users see aftermb init(status.md,roadmap.md,checklist.md,backlog.md,research.md,progress.md,lessons.md).
What stays English (contract)¶
These are machine-readable anchors — every mb-* script uses them across
all locales. They must not be translated in any templates/locales/*/ file:
<!-- mb-active-plans -->/<!-- /mb-active-plans --><!-- mb-recent-done -->/<!-- /mb-recent-done -->## Ideas(inbacklog.md)## ADR(inbacklog.md)
Also English-only (by design):
commands/mb.md— prompt for the agent, not user-facingscripts/*.shCLI output / error messagesdocs/(except this file and the one-paragraph i18n note inREADME.md)RULES.md— code-review rules, terminology is already English-heavy
User-facing CLI surface¶
# Install the skill with a preferred locale
memory-bank install --language ru
# Bootstrap .memory-bank/ in a project
memory-bank init --lang ru
# or via /mb in Claude Code:
# /mb init --lang=ru
# Resolve / change the locale of an existing bank
scripts/mb-config.sh get lang
scripts/mb-config.sh set lang es
Resolution order (highest priority → lowest):
--lang=<code>flag on the current commandMB_LANGenvironment variable$MB_ROOT/.memory-bank/.mb-config→lang=<code>- Heuristic auto-detect from existing bank content (Cyrillic →
ru, elseen) — result is written back to.mb-configto make subsequent runs deterministic. - Default:
en
Adding a new locale (contributor workflow)¶
Goal: turn a scaffold into a full translation, or add a brand-new language.
- Pick the locale code — use the ISO 639-1 two-letter code (
fr,de,ja, …). - Open a tracking issue on GitHub so duplicate work doesn't happen.
- Create the directory
templates/locales/<lang>/.memory-bank/if it does not yet exist, and seed every file from theenbundle. - Translate the 7 core files. When done, remove the
TODO(i18n-<lang>):banner line from the top of each file. - Preserve canonical anchors (see "What stays English" above) — translate only prose, headings that are not anchors, and inline comments.
- Extend the CLI whitelist:
scripts/mb-config.sh→SUPPORTED_LOCALES=(…)scripts/mb-init-bank.sh→SUPPORTED_LOCALES=(…)install.sh→VALID_LANGUAGES=(…)memory_bank_skill/cli.py→VALID_LANGUAGES = (…)- Update tests in
tests/pytest/test_locales_structure.pyandtests/pytest/test_cli_lang.py— add the new code toSUPPORTED_LOCALES/FULL_LOCALES(after translation) orSCAFFOLD_LOCALES(while the bundle still containsTODO(i18n-<lang>)banners). - Run the full suite:
PYTHONPATH="$PWD" python -m pytest tests/pytest/ --no-cov
bats tests/bats/test_mb_config.bats tests/bats/test_mb_init_bank.bats
bats tests/e2e/test_install_uninstall.bats
- Document the new locale in this file's table and in
CHANGELOG.md.
Why this design¶
- English as source of truth keeps the skill accessible to every contributor regardless of their native language.
- Opt-in locales mean non-English speakers are first-class without forcing every user to read translated CLI strings.
- Canonical English anchors keep the scripts locale-agnostic — we never have to maintain N parallel regex patterns.
- Scaffold-first for new languages ships the infrastructure immediately and lets the community contribute translations asynchronously via PR.