Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Usenet -> comp.databases.theory -> Re: Need some hints for a multi-language (mysql) site

Re: Need some hints for a multi-language (mysql) site

From: Murdoc <>
Date: Sat, 18 Mar 2006 23:20:45 +0000 (UTC)
Message-ID: <>

Martien van Wanrooij wrote:

> Hello all,
> I have been looking around at Google without too much success because I need some tips for a
> website I am making now. It is for a travel agency and the core of the website are, of course,
> the accomodations that can be rent. A table could have fields like an accomodation_id, the
> accommodation name(= page title), maximum number of persons, a picture_id that refers to another
> table with pictures but I am a little bit puzzled about the descriptions that come in several
> languages. I think it is NOT a good id to make fields like description_french,
> description_german, description_english etc, I guess there should be something like a table of
> descriptions that contains fields like the description itself, a language_id and an
> accomodation_id. However there are not only accomodations, the more general info pages will be
> also translated in all the available languages, they "behave" much the same like the
> accomodation pages as for the title and the pictures that are shown. Anyway some tips would be
> welcome, I am aware that there must be some info about it "somewhere" on the web but as I said
> probably I didn't "google" for the right keywords. FYI, the site is made with php and mysql but
> obviously my question refers to the "thinking" I have to do before starting to write the code.
> Thanks for any help
> Martien.

My opinion has always been that the presentation layer is responsible for the translation between multiple languages. Any text that needs to be translated should be stored in the database in a common language (e.g. English). Whenever that text needs to be displayed, then it should be translated into whichever language the user selects.

Not sure how it would be done with PHP, but JSP achieves internationalisation by having multiple resource files, that consist of a pure 1-1 mapping of the source text, and the translated text.

Hello -> Bonjour
Goodbye -> Au Revoir

Received on Sat Mar 18 2006 - 17:20:45 CST

Original text of this message