Expand description
Bilingual message layer for human-facing stderr progress (--lang en|pt, SQLITE_GRAPHRAG_LANG).
Bilingual human-readable message layer.
The CLI uses --lang en|pt (global flag) or SQLITE_GRAPHRAG_LANG (env var) to choose
the language of stderr progress messages. JSON stdout is deterministic and identical
across languages — only strings intended for humans pass through this module.
Detection (highest to lowest priority):
- Explicit
--langflag - Env var
SQLITE_GRAPHRAG_LANG - OS locale (
LANG,LC_ALL) withptprefix - Fallback
English
Modules§
- errors_
msg - Localized error messages for
AppErrorvariants. - validation
- Localized validation messages for memory fields.
Enums§
Functions§
- current
- Returns the active language, or fallback English if
initwas never called. - error_
prefix - Localized prefix for error messages displayed to the end user.
- init
- Initializes the global language. Subsequent calls are silently ignored (OnceLock semantics) — guaranteeing thread-safety and determinism.
- tr
- Translates a bilingual message by selecting the active variant.