upleveled / system-setup

Set up a PERN development environment on Windows, macOS and Linux
28 stars 19 forks source link

German Postgres when Looking or expecting English #73

Closed Draikth closed 1 month ago

Draikth commented 2 months ago

Not sure if this requires this format and it is not that urgent but thought I'd ask anyway and good practice for getting the question format right :man-shrugging:

:one: What happened that was unexpected Started up postgres to look at setting up a databse and everything is in German (screenshot to follow, not sure how to put it so that it falls under the no1 query)

:two: What were your expectations That postgres would be in English

:three: Your guess of what the problem is Maybe it has something to do that I bought this laptop in Austria? but the language of my computer was set to be in English so I'm hoping there might be a way to change it, unless it is hardcoded to the original language (which I would really suck), as sometimes I do still get restart messages or stuff like that in German.

:four: A list of things you have tried to solve it Looked at a few sites online but they are suggesting things that I either do not know where to insert the code snippets in the first place, or things that I feel I do not have the confidence to do and don't want to risk doing something that ends up screwing up something and ends up causing errors in postgres. here are some of the sites I looked at: https://dba.stackexchange.com/questions/158319/how-can-i-change-the-language-of-postgresql-logs https://stackoverflow.com/questions/191428/change-language-of-system-and-error-messages-in-postgresql and then some stuff about trying to change language in an Environment Variable Item which I really have no clue about but looking for it, doesn't seem I can access it on my system... (possibly because I don't have the right windows package or suite or something along that line...) or rather not confident to actually change something if I did find it. https://learn.microsoft.com/en-us/sql/t-sql/statements/set-language-transact-sql?view=sql-server-ver16&redirectedfrom=MSDN https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc772047(v=ws.11)?redirectedfrom=MSDN german postgres in Hyper

karlhorky commented 2 months ago

@ProchaLu @Eprince-hub After we find a solution here, we can also consider documenting it permanently as part of the System Setup guide steps.

Draikth commented 2 months ago

After running locale on command line the result was:

LANG=de_DE.UTF-8
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_ALL=

Victor suggested I run setx LC_ALL en_US.UTF-8 (as administrator) on the command-line, which then after closing and opening the terminal again running locale the result changed to

LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_ALL=en_US.UTF-8

Which changed the psql from German to English 2024-06-12 09_35_57-Hyper english

after a few hours I rebooted my system and checked again and the language was still set to English.

karlhorky commented 2 months ago

Thanks @Draikth !

@Eprince-hub @ProchaLu maybe you can open a PR now to propose permanent changes to the System Setup - for whatever systems need it, it's possible that it's not just Windows.