Search Postgresql Archives

Re: libpq messages language

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you for your reply

but I got the error 'LC_MESSAGES' : undeclared identifier

locale.h only defines LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC, LC_TIME

I tried to set a system variable LC_MESSAGES, but didn't work

Then, I tried to find more information


In libpq, when ENABLE_NLS is not defined,
#define libpq_gettext(x) (x)

If I set ENABLE_NLS to 1, then I think I need the gettext library, because it needs <libintl.h>

so, there is no simple way in windows to get messages in spanish within libpq before connecting to server, is correct?

thanks


----- Original Message ----- From: "Albe Laurenz" <laurenz.albe@xxxxxxxxxx> To: "Efraín López *EXTERN*" <tecnomaya@xxxxxxxxxxx>; <pgsql-general@xxxxxxxxxxxxxx>
Sent: Tuesday, December 04, 2007 5:33 AM
Subject: RE:  libpq messages language


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


---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

              http://www.postgresql.org/docs/faq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux