Re: Multilingual database

From: "M(dot) Bastin" <marcbastin(at)mindspring(dot)com>
To: Terence Ng <ngterry2000(at)yahoo(dot)com(dot)hk>
Cc: novice pgsql <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Multilingual database
Date: 2003-05-13 20:53:31
Message-ID: a05210607bae7083d5a57@[213.119.70.233]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

At 11:12 AM +0800 5/13/03, Terence Ng wrote:
>I see. Thank you very much. But I have come up
>another question. For the language-dependent
>information, there is a code to differentiate each
>record, and every column has the same language.

No! One single column contains all descriptions, regardless of their language!
If you'd have a column per language, then you'd get into the same
kind of problems as when you'd have a table per language.

Example:

CODE LANGUAGE DESCRIPTION
x123 French frites surgeles
x123 English frozen french fries
z456 French gaufres belges
z456 English belgian waffles

> What
>if I expand my web site, allowing customers from
>different countries lookup their orders. How do I
>record their information if I allow them to register
>their info in their languages? For example, I will
>have customer_id and customer_name. How do I record
>customer_name? Is it a good practice if I create
>every language a column, with customer_id as a
>relation?

Your customer data is probably not language dependent. One table
should be enough.

Example:

ID LAST NAME FIRST NAME GENDER LANGUAGE ADDRESS
101 Dupont Louis m French ... France
102 Jones Tina f English ... USA

The way you present this information on screen should be in the
customer's language, but each bit of customer information you
actually want to store, is unique per customer, and the language is
not relevant: a last name is just always a last name, whether the
person speaks French or English.

Marc

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Katy Earl 2003-05-13 21:15:46 Re: can't alter user with the postgres user
Previous Message Josh Berkus 2003-05-13 20:43:53 Re: can't alter user with the postgres user