Multi language website is a big challenge for new developer. They feel that its very hard job to create a multi language website. But in real this job is very easy to handle. I am going to explain in simple steps to handle multi language website.
Before going into much details, I would like inform this is smallest & easiest way to achieve multi-lingual website & only applicable for small scale websites. This may not be 100% optimized way to achieve this but for sure easiest way to achieve this.
Suppose you have a message in website & want to show that in 2 different languages. Store that message in a arrays. For example
$en_array['content1']="Message in English";
$other_language['content1']="Message in other language";
After creating 2 different arrays, you need to assign them to a fixed array that will be used to print content on website.
For example
In your website you are printing message using $message['content1'];
You don't need to change anything here just set
$message=$en_array when somebody chooses English language And set
$message= $other_language when somebody chooses Other language.
Now keep adding your content in these language array & print them using $message['index'].
Note you need to keep index of array same in both arrays & you need to print same index using $message.
Thats it.
Comments
shanghai massage
Mike
Let's collaborate
write to us
contact@ucodice.com
Quick
Links
Contact Form