Languages

Brief

Every menu, button and label in Terminal Delight comes in nine languages: English, Español, Deutsch, Français, Русский, 中文, 日本語, 한국어 and हिन्दी.

Press F1 to open help, click 🌐 English ▾ at its top, and type to filter: the language's own name, its English name or its two-letter code all work. Enter picks the highlighted one, the window changes at once, and the choice is saved with the session, so two windows on two sessions can show two languages.

Key names like Ctrl+T, symbols, and names like FOCUS, MCP, claude and codex stay as they are in every language. So does anything a program reads: MCP answers, the command line and logs are always English, and so is anything your programs print.

Technical has the codes, the picker's keys, what is counted, and how a language is added.

Technical

Codes and strings

CodeShown asEnglish
enEnglishEnglish
esEspañolSpanish
deDeutschGerman
frFrançaisFrench
ruРусскийRussian
zh中文Chinese
ja日本語Japanese
ko한국어Korean
hiहिन्दीHindi

That is also the picker's order.1

The picker#

The pill sits in the help panel's header and shows the current language's own name. Clicking it opens a list headed 🌐 LANGUAGE with a count such as 9/9, which drops as you type. While the list is open it takes the keyboard:2

KeyDoes
any letterFilter. german, deu and de all find Deutsch.
↓ or Tab, ↑Move the highlight.
EnterSwitch to the highlighted language and save it.
Esc, or a click outsideClose without changing anything.

Where the choice is saved#

In the lang field of the session file, ~/.config/terminal-delight/sessions/<name>.toml, in lowercase: lang = "zh". A file with no lang field opens in English. When editing the file by hand, use one of the nine codes exactly: the file is read strictly, and a value that isn't one of them stops the whole file from loading.2

What is translated#

Every piece of text a person reads on screen is a field in one of four tables: the help menu and shared labels, the window's own chrome (menus, trays, dialogs, panels, the left bar), everything the panes, workbench and document viewer draw, and the Git overlay. Each language carries a complete copy of all four. On 0.4.0 that is 1,372 entries per language. has 1,627, mostly from the Threshing Floor, UI CONFIG and the ADMIN panel.1

Pane labels follow the same rule: SHELL and REMOTE are translated (CONSOLA, ОБОЛОЧКА, シェル), while CLAUDE, CODEX and program names are not. The labels the MCP server reports stay in English whatever the window shows, so a script reads the same words in any language.

Forty-five of the entries are counted phrases, such as a number of panes. Each holds four forms, and the language picks one: Russian uses three (1, 2 to 4, 5 and up, by the last two digits), French and Hindi treat zero as singular, and Chinese, Japanese and Korean use the same words for every number.1

Adding a language or a string#

English is the source. A language that leaves out a field doesn't compile, so a half-translated build can't ship; adding a language means adding it to the list and writing its four tables, and the compiler names every field still missing. A test also fails when a translation is left identical to its English, unless the word is on a short list of cognates such as CRT and Plugins.

Every pull request runs a check called Translation suggestions, which marks on-screen English the change adds without a translation. It never fails a build. The how-to is docs/TRANSLATING.md.3

On 0.5.0 the chrome table's fields are private to the app, so a string the app no longer draws fails the build as unused.

The tables were first generated with a machine translation that worked from the meaning of each English line, and are edited by hand since. None has had a pass by a native speaker yet.

What would prove this wrong#

A label that stays in English after you switch language, outside the exceptions above. Every on-screen string is supposed to come from the tables, so one that doesn't is a missing entry.

Sources

  1. The nine languages, the four tables, plural forms and their tests: lang.rs, lang/chrome.rs, lang/parts.rs, lang/coord.rs. Entry counts are the fields of the four structs; 0.5.0's from lang/chrome.rs and its siblings.
  2. The picker, its keys, and the session file's lang field: main.rs (LangPicker, filtered_langs, StateFile, load_state).
  3. The suggestion check: scripts/translation-suggest.py, run from .github/workflows/ci.yml.