Re: libpq messages language - Mailing list pgsql-general

From Albe Laurenz
Subject Re: libpq messages language
Date
Msg-id D960CB61B694CF459DCFB4B0128514C2A0B776@exadv11.host.magwien.gv.at
Whole thread Raw
In response to libpq messages language  (Efraín López <tecnomaya@cabsagt.com>)
List pgsql-general
Efraín López wrote:
> I am using Windows, and pg 8.2.5
>
> When making a connection with libpq, if it fails I would like
> to get the errors messages in spanish (PQerrorMessage  )
>
> Is this possible? How can this be done?

Set the program's locale prior to calling libpq functions.

I did not try it on Windows, but Microsoft seems to work like
UNIX in that respect:

http://msdn2.microsoft.com/en-us/library/x99tb11d(VS.80).aspx

Try something like

setlocale(LC_MESSAGES, "Spanish");

or, if your language environment is Spanish, simply

setlocale(LC_MESSAGES, "");

Yours,
Laurenz Albe

pgsql-general by date:

Previous
From: "Christian Rengstl"
Date:
Subject: Re: Archiving problem on Windows
Next
From: Michelle Konzack
Date:
Subject: Re: 1 cluster on several servers