Skip to content

Custom texts

Every visible string comes from a text file per language. You can override single strings without rebuilding the image by mounting a directory and pointing TEXTS_DIR at it. Only the keys you list are replaced; everything else keeps its default.

texts/
locales/
en.yaml
de.yaml
themes/
terminal/
locales/
en.yaml
  • locales/<lang>.yaml applies to every theme.
  • themes/<theme>/locales/<lang>.yaml applies only while that theme is selected, and wins over the file above it.

Languages are de, en, pl and fr. Files are optional, and a file for a language that is not in LANGUAGES is ignored. Texts are read once at start, so restart the container after a change. A file that is not valid YAML stops the container at start.

The order of precedence, last one wins: built-in texts, built-in theme texts, then your locales, then your themes/<theme>/locales.

services:
error-pages:
image: noixdev/error-pages
environment:
TEXTS_DIR: /texts
volumes:
- ./texts:/texts:ro

texts/locales/en.yaml:

pages:
"404":
title: "We could not find that page"
description: "Try the start page or use the search."
maintenance:
title: "Back soon"
description: "We are updating the shop. Please come back in a few minutes."
closing: "Thank you for your patience."

Quote numeric page keys such as "404".

KeyMeaning
pages.<code>.titleTitle of the page for that code, for example pages."404".title.
pages.<code>.descriptionShort explanation under the title.
pages.maintenance.closingClosing line of the maintenance page.
pages.internal.*The internal-only page (title, description).
pages.4xx.*, pages.5xx.*Texts for codes without their own page.
ui.error, ui.back, ui.reload, ui.please, ui.or, ui.languageLabels and short words around the page.
ui.expected_backExpected end of maintenance. Keep the {time} placeholder.
chain.*Labels in the status theme: you, browser, network, host, working, failed, happened, cando.
advice.browser, advice.network, advice.hostThe “What can I do?” text of the status theme, per failing link.

The built-in files are the complete reference for the available keys and their wording. They are in the repository under web/locales.

texts/themes/terminal/locales/en.yaml only affects the terminal theme:

ui:
back: "Return"
reload: "Retry"

Link labels do not come from these files; set them in LINKS or in the YAML configuration. See Footer links.