public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* `locale -s` shows incorrect info on systems where the language is changed after the OOBE
@ 2022-04-29 10:16 Gennaro Prota
  2022-04-29 11:54 ` Thomas Wolff
  0 siblings, 1 reply; 2+ messages in thread
From: Gennaro Prota @ 2022-04-29 10:16 UTC (permalink / raw)
  To: cygwin

Hi,

the locale utility currently gets the system default UI locale (-s option)
via GetSystemDefaultUILanguage().

This is a problem on systems where the default UI language is changed after
the Windows Out of Box Experience (OOBE), because that function will
happily ignore the fact (see <
https://docs.microsoft.com/en-us/windows/win32/api/winnls/nf-winnls-getsystemdefaultuilanguage
>).

FWIW, this is not just theoretical: on my work PC, which was set to Italian
during the first setup (not by me), and is now set to US English, the
locale utility shows:

  $ locale -s
  it_IT

-- 
Gennaro

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: `locale -s` shows incorrect info on systems where the language is changed after the OOBE
  2022-04-29 10:16 `locale -s` shows incorrect info on systems where the language is changed after the OOBE Gennaro Prota
@ 2022-04-29 11:54 ` Thomas Wolff
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Wolff @ 2022-04-29 11:54 UTC (permalink / raw)
  To: cygwin

Am 29/04/2022 um 12:16 schrieb Gennaro Prota:
> Hi,
>
> the locale utility currently gets the system default UI locale (-s option)
> via GetSystemDefaultUILanguage().
>
> This is a problem on systems where the default UI language is changed after
> the Windows Out of Box Experience (OOBE), because that function will
> happily ignore the fact (see <
> https://docs.microsoft.com/en-us/windows/win32/api/winnls/nf-winnls-getsystemdefaultuilanguage
>> ).
> FWIW, this is not just theoretical: on my work PC, which was set to Italian
> during the first setup (not by me), and is now set to US English, the
> locale utility shows:
>
>    $ locale -s
>    it_IT
Please check: was the setting really changed for the whole system (i.e. 
also for other users) or only for your user account?
Is the change reflected by locale -u?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-29 11:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-29 10:16 `locale -s` shows incorrect info on systems where the language is changed after the OOBE Gennaro Prota
2022-04-29 11:54 ` Thomas Wolff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).