Problem: On MS-Windows the messages use the language of the regional
format, not the language that Windows is displayed in.
Solution: Use the display language for the messages, with the other
preferred languages as fall back. Make ":language messages"
overrule it.
fixes: #20855
https://github.com/vim/vim/pull/20860
(3 files)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Not a duplicate of #20204 (that one is about 'statusline' %P). #20201 is
the closest related report.
The report is correct, and the cause is in Vim itself: set_init_lang_env() in
src/option.c sets $LANG from GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SABBREVLANGNAME), which is the regional format, not the display
language. gettext then picks the messages from that.
I have a patch that takes the display language instead, using
GetUserPreferredUILanguages(), and only when none of $LANG, $LANGUAGE,
$LC_ALL and $LC_MESSAGES is set, so setting those keeps working as before.
$LANGUAGE gets the fall-back list, $LANG the language itself. The default
for 'helplang' follows the same value now.
The list stops after English on purpose: Vim ships no en catalog, so gettext
would otherwise fall through to a later preferred language, and a preference
list of "en-US, de-DE" would end up with German messages.
Verified on Windows 11 with display language Japanese and regional format
German (Germany): messages are now Japanese instead of German, the other locale
categories still follow the regional format, and set LANG=de still gives
German messages.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
thanks
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()