I have a web site which will run in 3 languages.
I have finish the database part. Every record will have a field called "language", the value are set up as engish, german, french.
Depends on what language the clients chose, the database will output the value with that selected language.
My question is how should I handle the web pages.
For example, the web page showrecords.php has the following contents.
showrecords.php
This is the record from database (...)
1) shoud i have one page showrecords.php and use the switch statments to have the contents in 3 langauges?
such as the showrecords.php will be
switch ($language)
{
case "english":
This is the record from database (...)
break;
case "french"
C'est le disque de la base de donn�es (...)
break;
case "german"
Dieses ist die Aufzeichnung von der Datenbank (...)
break;
}
2) or should i have 3 pages,
showrecord_english.php
this is the record from the database (...)
showrecord_french.php
C'est le disque de la base de donn�es (...)
showrecord_german.php
Dieses ist die Aufzeichnung von der Datenbank (...)
3) in simple words, should i have one set of web site and on every page, i used the switch statement to include the 3 langauges contents, or should i have 3 sets of the web site and each set for one language.
both of the solutions are working, as a matter of fact, i have used both approach in the past. i want to know what you think about and what is your experience, the advantage and disadvantage of each approach? I need your advices to help me make my mind to pick one approach for all my future multi-langauges project.
thanks.