Files
Eduard Ralph 2d73d17c52 docs(man): document LANGUAGE environment variable
Bug 10443: the man page's ENVIRONMENT VARIABLES section listed
LANG only. Users who set LANG=xx_YY.UTF-8 to switch languages and
hit a system where that alone isn't enough -- a common gettext
fallback chain hazard -- had no way to learn from the documentation
that they also needed to set LANGUAGE. The reporter found this
empirically after digging through "gramps -v" output, and asked
that the docs be updated to save other users the same time.

LANGUAGE has been a fully-supported, documented-in-source override
for years (gramps/gen/utils/grampslocale.py:250-256: colon-separated
list of language codes, splits on ":", overrides LANG and
LC_MESSAGES, logs "Overiding locale setting ... with LANGUAGE
setting ..."). The CLI help text in gramps/cli/argparser.py:140
already shows the LANGUAGE=de_DE; LANG=de_DE.UTF-8 idiom in its
report-generation example. Only the man page (and the wiki, which
is outside the source tree) hadn't caught up.

Add a LANGUAGE entry to data/man/en.rst's ENVIRONMENT VARIABLES
section, immediately after LANG, explaining the semantics and the
canonical "set both" idiom the reporter found works:

    LANG=ru_RU.UTF-8 LANGUAGE=ru gramps

Backtick style matches the surrounding file (double for variable
names referenced inline, single for value literals).

Out of scope:

  * Regenerating data/man/gramps.1.in via sphinx-build. That file
    is generated from en.rst and is regenerated in batches by
    maintainers (last regen: 8159aca9b4 "Generate gramps.1.in
    file", Feb 2022; en.rst has seen 4 unpaired commits since).
    Following the existing rst-only edit pattern -- maintainer can
    re-run sphinx-build -b man at the next batch regeneration.

  * Localized man pages under data/man/{cs,fr,nl,pl,pt_BR,sv}/.
    Those follow the Weblate translation workflow once en.rst is
    updated; translator-side change, not a same-PR concern.

  * The wiki pages the reporter and Sam888 actually flagged
    (Howto:Change_the_language_of_reports#How_to_install_a_locale
    and the two Gramps_5.0_Wiki_Manual_-_Command_Line /
    _-_Settings pages). Those are wiki edits outside the source
    tree; a separate community task.

Test: this is documentation, no functional code path changes. No
unit test applies. Manual verification: the prose accurately
describes the behavior implemented at grampslocale.py:250-256 (the
authoritative source) and gives the exact form the reporter
empirically found works.

Fixes #10443.
2026-06-15 22:55:44 +01:00
..