Re: [GENERAL] RE: [HACKERS] error messages not only English

From: Peter T Mount <psqlhack(at)retep(dot)org(dot)uk>
To: Vadim Mikheev <vadim(at)krs(dot)ru>
Cc: The Hermit Hacker <scrappy(at)hub(dot)org>, Peter Mount <peter(at)maidstone(dot)gov(dot)uk>, "'Jose' Soares Da Silva'" <sferac(at)bo(dot)nettuno(dot)it>, "'hackers postgres'" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [GENERAL] RE: [HACKERS] error messages not only English
Date: 1998-05-26 18:05:05
Message-ID: Pine.LNX.3.95.980526185849.1473B-100000@retep.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Wed, 27 May 1998, Vadim Mikheev wrote:

> The Hermit Hacker wrote:
> >
> > On Tue, 26 May 1998, Vadim Mikheev wrote:
> > >
> > > Yes, this is nice. One note: server have to load from this table all messages
> > > in a language requested by user when switching to this language - it's not
> > > possible to read any table from elog() in most cases.
> >
> > Hrmmm...one thing to note with any of this is that by 'hardcoding'
> > in the errormsg itself, it makes it difficult to 'internationalize' a
> > program...in that I can't run a single server on my machine that can
> > easily deal with a 'French' customer vs an 'English' one, vs a 'Japanese'
> > one...I'd have to recompile for each.

This could be got round by using error numbers (which is now on the TODO
list). Error messages that include data (like table names) could include
them using fprintf style %d or %s parameters.

> > Vadim's other point, about putting this in the front end vs the
> > backend, I think, is more appropriate, that way it is application specific
> > vs server...
>
> I didn't mean to put them in the front-end - this is another good idea :).
> Yes, we could let fe-libpq to read message corresponding to received
> error code in appropriate file on client side.

In libpq, this could be added to PQerrorMessage(). This could attempt to
get the native language error message from the DB, defaulting to either an
english one, or just the error code (it would be a bad problem in this
case).

--
Peter T Mount peter(at)retep(dot)org(dot)uk or petermount(at)earthling(dot)net
Main Homepage: http://www.retep.org.uk
************ Someday I may rebuild this signature completely ;-) ************
Work Homepage: http://www.maidstone.gov.uk Work EMail: peter(at)maidstone(dot)gov(dot)uk

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter T Mount 1998-05-26 18:07:35 Re: [GENERAL] RE: [HACKERS] error messages not only English
Previous Message Vadim Mikheev 1998-05-26 16:16:49 Re: [GENERAL] RE: [HACKERS] error messages not only English

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter T Mount 1998-05-26 18:07:35 Re: [GENERAL] RE: [HACKERS] error messages not only English
Previous Message David Gould 1998-05-26 18:02:13 Re: [HACKERS] error messages not only English