The corresponding option is --locale=locale for the initdb command, which initializes your database cluster. If you do not specify it explicitly, it defaults to the system language. (You are probably using Ubuntu in the "C" locale.)
Read more in the excellent guide here .
In PostgreSQL, you can still sneak into a database with different languages, based on the new template0 database instead of the standard templeate1 . I quote here here :
The encoding and locale settings must match the database template settings, unless template0 is used as a template.
But I would prefer to recreate the database cluster with the desired locale. Much cleaner.
Edit: information about available locales
You can only use locales that are provided by the operating system. I quote here here :
What locales are available on your system, under what name depends on what was provided by the operating system provider and what was installed. On most Unix systems, the -a locale will provide a list of available locations. Windows uses more detailed locale names such as German_Germany or Swedish_Sweden.1252, but the principles are the same.
Take a look at locale-gen on a Unix system if you want to use a locale that has not yet been generated. It is important to understand that several locales can be installed in your OS, but only one of them can be selected for system parameters such as LC_CTYPE , LC_COLLATE , etc. Look at the result of locale compared to locale -a in the shell. Usually it is the same for everyone, set via LC_ALL .
@David: What you did might have solved your problem, but it could have been easier for you. Also, remember that the LANG environment variable provides only the default for all locale settings. If either of them is set to something else, LANG will be overridden. Set LC_ALL to override any existing settings. Here is one of the many sites on the net telling you this.
To check all the current locale settings of your database (cluster), run in your database:
SHOW ALL;
Or more specifically:
SELECT * FROM pg_settings WHERE name ~~ 'lc%';