I am making a multilingual website in php.
I need to make it in german and english. English i have no problem but
how can i make the pages in german. I have all the content translated
in german but what change in the php and html code do i have to do to
make the content display in german.
pls help me. its really urgent
Thankssss
Cloudymegz
My approach is, first of all, to separate the HTML structure from the
text content, so I can fill an empty HTML template with variable text
according to the user's language choice.
I keep all the text in a MySQL table with one of two record structures:
1)
`EN` = text in English
`DE` = text in German
With this record structure, you read the records for the current page
and display either the EN field or the DE field according to the
user's current language choice.
SELECT {$sLang} AS content FROM `tableName` WHERE
`pageName`="{$sCurrentPage}" ...
2)
`content` = text
`language` = EN or DE
With this second record structure, you select records for the current
page AND for the current language choice, then display the `content` field.
SELECT `content` FROM `tableName` WHERE
`pageName`="{$sCurrentPage}" AND `language`="{$sLang}" ...
Here's a bilingual English/French website I did this way:
http://partcon.ca/
Regards,
Paul