|
Posted by BLob on 01/12/06 12:59
Hi,
I am building a multi languages website. To simplify let's say that I need
to deal with news, projects, partners, all of them having some information
depending on the language (title, introduction, ...) and some not depending
on the language (date_online, date_offline, published, ...). The main point
is that I don't want to have to touch the structure of the database or to
modify my scripts if one or more languages were to be added. I came up with
something like this :
My architecture:
----------------------------------------------------------------------------
------
'news' table: with all information not depending on the language
news_id (primary key)
date_online
date_offline
published
...
'news_translations' table: with all information depending on the language
news_id (primary key)
lang (primary key)
title
introduction
...
The (news_id, lang) is linking the second table to the first one.
Same kind of structure for all other content that needs to be translated
(projects, partners, etc.).
Is there a better approach: something using only one table with all the
information that has to be translated, coming from any table (news,
projects, partners, etc.) ? or something else ?
Thank you,
BLob
[Back to original message]
|