Interface Translations

The web interface loads its labels from YAML files at runtime. This page explains how to add a language or change a translation without rebuilding the application.

Note: Only static interface strings are translated. Specifications, generated documentation, service descriptions and Markdown overlays are shown exactly as stored.

Translation files#

Translations live in data/translations/{lang}.yaml (in Docker: /data/translations/{lang}.yaml inside the docs-hub-data volume, for example edited with docker compose exec docs-hub vi /data/translations/de.yaml). A file is a flat key: value map:

app.title: "docs-hub"
button.rebuild: "Rebuild"
search.placeholder: "Search services, paths, tags"

Languages are discovered from the files in that directory. The language selector in the top bar lists them all.

Adding a language#

  1. Create data/translations/<code>.yaml, for example de.yaml.

  2. Add a language key naming the language in itself:

    language: "Deutsch"
    
  3. Refresh the page.

No other file needs to change. If a file has no language key, the selector shows the raw language code.

Missing keys#

  • A key missing from a file falls back to en.yaml, then to the built-in English text.
  • On every start, SelfDocHub appends any key it defines but a file lacks to that file, with its English value. Existing keys and your custom translations are never modified or removed. This keeps files complete and shows you what is still untranslated.

Default language#

default_language (DOCS_HUB_DEFAULT_LANG, default en) is used when the browser asks for the default bundle. See Configuration Reference.

Exports#

Every export has its own language. Static texts of the exported file, such as section captions and table headers, come from the export.doc.* keys of the language files. See Export Wizard.

Next steps#

Screenshots

Last updated: