Re: libpq messages language
От | Efraín López |
---|---|
Тема | Re: libpq messages language |
Дата | |
Msg-id | 000901c837b4$a0e12610$0401a8c0@TOSHIBA обсуждение исходный текст |
Ответ на | libpq messages language (Efraín López <tecnomaya@cabsagt.com>) |
Ответы |
Re: libpq messages language
Re: libpq messages language |
Список | pgsql-general |
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@wien.gv.at> To: "Efraín López *EXTERN*" <tecnomaya@cabsagt.com>; <pgsql-general@postgresql.org> Sent: Tuesday, December 04, 2007 5:33 AM Subject: RE: [GENERAL] 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
В списке pgsql-general по дате отправления: