...

View Full Version : Best way for bilingual site



RxDx
01-09-2010, 07:19 PM
Hello,

I need to launch bilingual site. What is the best and more efficient way to organize database, files and scripts that change language for both admin area and client area?

PHP6
01-09-2010, 08:49 PM
First of all you will need to use Unicode for your tables. Second you will need to create different HTML pages for different languets and finally you will need to have some kind of message dictionary which will be used in the PHP script (all texts should be encoded with the same encoding).

As for the part how you will implement everything, it is really hard to say, there is not unique or the best way) I never used database for that, I prefer different folders with all data inside (HTML + one dictionary file). So later to change the language I just need to change one variable (the source).

JAY6390
01-09-2010, 09:14 PM
It all depends on how diverse your content is and how you want to load the content. Personally I'd use subdomains for each language, like en.yoursite.com, de.yoursite.com, fr.yoursite.com for English, German and French languages respectively. Then just call up your bootstrap for the site, figure out the language from the domain and load your data for that language from a template file of predefined strings for that language



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum