I am seeking advice about creating a website in more than one language (English and Arabic), where the user can choose which language he wants the site to be displayed in. What do you recommend???
Should I create 2 separate pages for each page (EX: index.php and indexAR.php)??? so if my website has 20 pages, i will actually have 40 (20 for the english and 20 for the arabic)
OR should i simply create 1 of each page and just use a bunch of IF/ELSE statements in PHP to determine which language the use has chosen (through GET)???
please advise which is the most suitable way to go about this or pleease recommend another way.
FYI, Joomla itself don’t have the native language component.
It’s dependent on JoomFish which uses the single table for the translation of all the joomla tables.
If you can use some content management system like Joomla then you can find a lot help on it with less attention to presentation and more on problem solving
Store the language strings in two separate files (or database) with the same names but different values.
Set a cookie/session/whatever based on the language the user selected.
Load the appropriate language and echo the strings.