Skip to content

imp: web: --lang sets the language of every page - #2763

Closed
acinader wants to merge 1 commit into
hledgerorg:mainfrom
acinader:web-lang-override
Closed

acinader wants to merge 1 commit into
hledgerorg:mainfrom
acinader:web-lang-override

Conversation

@acinader

@acinader acinader commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

When hledger-web is started with --lang LANG, other methods for setting l10n are ignored and all pages will be served in the requested locale.

see discussion: #2736

AI usage: Claude Opus 5.5, ~8k output tokens.

When hledger-web is started with --lang LANG, every page is now in that
language, whatever the browser asks for: a ?_LANG parameter, the _LANG
cookie, and Accept-Language are ignored, and no language cookie is set.
So a user can run hledger-web in a language other than their browser's,
and an administrator can give every user of a server the same language.
Until now --lang was only the fallback, when none of those named an
available language.

--lang auto still leaves the choice to each viewer, falling back to the
environment's language; without --lang the fallback is English.

As discussed in hledgerorg#2736.

AI usage: Claude Opus 5.5, ~8k output tokens.
@simonmichael

Copy link
Copy Markdown
Member

Thanks! Merged by shenanigans.

@simonmichael simonmichael added A-BUG Something wrong, confusing or sub-standard in the software, docs, or user experience. web The hledger-web tool. and removed A-BUG Something wrong, confusing or sub-standard in the software, docs, or user experience. labels Oct 1, 2026
@acinader
acinader deleted the web-lang-override branch October 1, 2026 03:36
@acinader
acinader restored the web-lang-override branch October 1, 2026 03:36
@acinader
acinader deleted the web-lang-override branch October 1, 2026 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

web The hledger-web tool.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants