Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Localization

PRECC renders its status line and short feedback strings in 28 languages. Translations are compiled into the binary, so language selection costs no extra I/O at hook time.

Setting the language

Set the PRECC_LANG environment variable to a supported language code. This wins over every other source.

$ PRECC_LANG=zh precc savings
$ export PRECC_LANG=ja

Persisting via consent.toml

Add [ui] preferred_language = "ja" (or any supported code) to ~/.config/precc/consent.toml to keep the choice across shells without exporting an env var.

# ~/.config/precc/consent.toml
[ui]
preferred_language = "ja"

Resolution order

PRECC checks PRECC_LANG first, then [ui] preferred_language in consent.toml, then falls back to English. The first non-empty signal wins and is cached for the lifetime of the process.

1. PRECC_LANG          (environment variable)
2. consent.toml        ([ui] preferred_language)
3. "en"                (default)

Coverage

28 language columns ship in the translation table. Cells we cannot hand-verify are left empty and fall back to English at lookup time, rather than displaying fabricated script. If you can improve a translation, please send it upstream.

en  es  de  zh  fr  pt  ja  vi  nl  hu  ar  fa  tr  ko
th  my  mn  bo  pl  ru  zt  da  sv  fi  it  is2 ro  cs

Why it stays fast

Translations are stored as compile-time const arrays inside the precc-core binary, not in SQLite. The hook performs a single in-memory array lookup, so translation costs nothing measurable against the < 5 ms p99 hook budget.