11

My MS Windows system is French version. I've recently installed PostgreSQL server. Although pgAdmin is in English I get French messages in the PostgreSQL psql command line.

Cœur
  • 37,241
  • 25
  • 195
  • 267
abderrahmen
  • 351
  • 1
  • 3
  • 14

3 Answers3

23

If you have permissions for access to $datadir\postgresql.conf change lc_messages parameter to English_United States.1252. You need to reload configuration (do restart of the server).

My config is:

# These settings are initialized by initdb, but they can be changed.
lc_messages = 'English_United States.1252'  # locale for system error message

# strings
lc_monetary = 'English_United States.1252'  # locale for monetary formatting
lc_numeric = 'English_United States.1252'   # locale for number formatting
lc_time = 'English_United States.1252'      # locale for time formatting

# default configuration for text search
default_text_search_config = 'pg_catalog.english'
1ac0
  • 2,875
  • 3
  • 33
  • 47
Hasan BINBOGA
  • 794
  • 9
  • 19
  • 4
    This was the solution that worked for me, thanks. The "environment variable" mentioned in the other post didn't work. In case anybody else is wondering: in my case, the `postgresql.conf` file was located under `C:\Program Files\PostgreSQL\9.5\data\postgresql.conf`. – Xavier Peña Jul 20 '16 at 08:55
  • On Windows you have to restart the PostgreSQL service for the change to take effect. Find it among other services in [Windows Services Manager](https://www.digitalcitizen.life/ways-access-services-windows/), right-click it and select `restart`. Wait it restarts and check the result. – Valentine Shi Dec 28 '20 at 11:58
  • `English_United Kingdom.1252` for those want to change it to UK English. – obnews Sep 24 '22 at 20:39
16

You need to define an environment variable named LC_MESSAGESand set that to English

enter image description here

  • Is there any way to do this through my application's settings to have control over these messages in an application? I am using Delphi with FireDAC data access components. – Paul Mar 28 '17 at 11:27
2

You can define LC_MESSAGES MS Windows environment variable or configure your postgresql.conf file. If they will be set both for different values, postgresql.conf will take the place. Look into docu here and here.

1ac0
  • 2,875
  • 3
  • 33
  • 47