Re: One True i18n Table

From: Tony <andrewst_at_onetel.com>
Date: 16 Oct 2004 02:25:01 -0700
Message-ID: <ed8a00fa.0410160125.701ade2c_at_posting.google.com>


Kenneth Downs <firstinit.lastname_at_lastnameplusfam.net> wrote in message news:<6keokc.sif.ln_at_mercury.downsfam.net>...
> --CELKO-- wrote:
>
> >>> I am wondering how others have approached this. <<
> >
> > If we are talking about the same thing, use SQLSTATE and attach
> > various languages to each code in a single table:
> >
> > CREATE TABLE ErrorMessages
> > (err_msg_code CHAR(5) NOT NULL PRIMARY KEY,
> > english_err CHAR (25) NOT NULL ...
> > french_err NCHAR (25) NOT NULL ..
> > ...
> > esperanto NCHAR (25) NOT NULL ..);
>
> ouch. The above requires a structure change to add a language.

Yes, and an application change to the SQL which will look something like:

SELECT CASE :my_language

       WHEN 'English' THEN english_err
       WHEN 'French' THEN french_err
       ...
       END

FROM ErrorMessages
WHERE err_msg_code = '42'; Received on Sat Oct 16 2004 - 11:25:01 CEST

Original text of this message