You are here: Re: How to make mulitlingual website? « PHP Programming Language « IT news, forums, messages
Re: How to make mulitlingual website?

Posted by Jerry Stuckle on 06/28/05 15:57

madsgormlarsen@gmail.com wrote:
> Should one place all the text in one big table, or is i better to place
> it in several tabels. Should one make 4 colums one for each language,
> or 4 rows one for each language?
>

Think - normalize, normalize, normalize.

Think - 4 columns - one for each language. What happens if you need to
add a fifth language? How much code will you have to change?

Several tables - again, if it's one for each language, how much code
will you have to change? Probably not as much. But in either case you
have to change the database.

One big table - I doubt it will be "big". "Big" in database-ese often
means terabytes. A couple of megabytes is nothing.

I would put things in one table with a layout similar to:

id: integer
language: char(2)
Actual info: text

Integer is not an auto-increment. Rather, it is some id you generate
for each page. The combination of id and language (2 character ICANN
country codes works great in most cases) is used for the primary key.

In you code for a specific page, the id never changes, the language is
based on what they select.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация