Forum Moderators: coopster

Message Too Old, No Replies

Supporting multiple Languages

wanting to add Arabic

         

Habtom

11:17 am on May 31, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Currently our booking site supports English, French, Dutch and Spanish. The data is stored in a database, as they come out they get translated by functions in PHP into the other languages in different pages.

The structure is somewhat like

$DAYS = array(
"mon" => array("Mon","Lunes","Lundi","Montag","Maandag", "?"));

Right now, I also like to include arabic. The arabic texts upon the re-opening of the file they convert themselves to the question marks. And on the web pages, the question marks appear. This could be obviously the issue of unicode UTF stuff. Any ideas how I can accomodate this?

Habtom

Habtom

5:59 am on Jun 1, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Got a solution for it:

<META http-equiv="Content-Type" content="text/html; charset=windows-1256">

And change the encoding type of the PHP files to Arabic.

Habtom

coopster

4:20 pm on Jun 1, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Yes, you will have to change the charset. You could also use setlocale() to get the day names, etc. There is an example on this page regarding outputting a different language dynamically [webmasterworld.com] to get you moving in that direction if you are interested.

Habtom

8:25 pm on Jun 1, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks Coopster. It is helpful.