Working with Arabic Language

April 21st, 2009 by vishal.parmar § 1

We have lot of clients in Middle East and thus we have to develop almost all the projects in English and Arabic.

Developing in Arabic can be quite challanging sometimes not just because it is a different language but it is also read and written from right to left. So it is a very vast subject but right now let us focus on few things.

Following are couple of issues you may come across working with Arabic but there are also simple solutions to them as explained below.

(1) Sending email in Arabic

Sometimes we find that Arabic mail is displayed properly in gmail,yahoo etc but they dont look ok in Outlook, Zimbra.

Instead of Arabic junk data like following comes in email:

áã íÊã ÝÊÍ ãáÝ ÇáÞÇáÈáã íÊã ÝÊÍ ãáÝ ÇáÞÇáÈ
áã íÊã ÝÊÍ ãáÝ ÇáÞÇáÈáã íÊã ÝÊÍ ãáÝ ÇáÞÇáÈ

Solution to this problem is very simple

You just need to set mail header charset as UTF-8 intead of iso-8859-1.

PHP example:

$headers  = ‘MIME-Version: 1.0′ . “\r\n”;
$headers .= ‘Content-type: text/html; charset=UTF-8‘ . “\r\n”;

(2) To display HTML page in Arabic Language

<html xmlns=”http://www.w3.org/1999/xhtml“>
<head>
<meta http-equiv=”content-type” content=”text/html; charset=UTF-8“>

I hope this may help you someday when you are stuck.

Would you like to share some of your tips about working with Arabic language here? please write them in comments.

Thanks.

Tagged: , , , , , ,

§ One Response to “Working with Arabic Language”

  • vishal says:

    Ram Ram vishalbhai,

    you have published cool post regarding arabic language, but u forget to mention of how to change reading directions ,, right ?

    so do you have any basic idea how to achieve left to right and right to left directions for html data ?

    please don’t mention css property “text-align:right”

  • § Leave a Reply

What's this?

You are currently reading Working with Arabic Language at Digicorp.

meta

Share