Re: libpq messages language

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: Efraín López *EXTERN* <tecnomaya(at)cabsagt(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: libpq messages language
Date: 2007-12-04 11:33:54
Message-ID: D960CB61B694CF459DCFB4B0128514C2A0B776@exadv11.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bill Moran 2007-12-04 13:45:46 Re: Transaction problem
Previous Message Christian Rengstl 2007-12-04 11:30:44 Re: Archiving problem on Windows