<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Digicorp &#187; Arabic</title>
	<atom:link href="http://dev.digi-corp.com/category/arabic/feed/" rel="self" type="application/rss+xml" />
	<link>http://dev.digi-corp.com</link>
	<description>&#62;&#62; Developer Blog</description>
	<lastBuildDate>Wed, 22 Jun 2011 14:13:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Things to take care while developing Arabic Sites and Applications</title>
		<link>http://dev.digi-corp.com/2009/05/things-to-take-care-while-developing-arabic-sites-and-applications/</link>
		<comments>http://dev.digi-corp.com/2009/05/things-to-take-care-while-developing-arabic-sites-and-applications/#comments</comments>
		<pubDate>Tue, 26 May 2009 11:00:49 +0000</pubDate>
		<dc:creator>devdatt.mehta</dc:creator>
				<category><![CDATA[Arabic]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://dev.digi-corp.com/?p=286</guid>
		<description><![CDATA[We are working with clients in Middle East for almost 5 years now and we have learned lot of things about development in Arabic language. Following are some points which will help you in developing any website or application in Arabic. Arabic is written right to left If you are developing it for Kuwait clients [...]]]></description>
			<content:encoded><![CDATA[<p>We are working with clients in Middle East for almost 5 years now and we have learned lot of things about development in Arabic language.</p>
<p>Following are some points which will help you in developing any website or application in Arabic.</p>
<ul>
<li>Arabic is written right to left</li>
<li>If you are developing it for Kuwait clients price should be in KD and with 3 Decimal pleases.</li>
<li>How to display Arabic word in html ? Should I use UTF-8 charset to 	display Arabic in html page ?</li>
</ul>
<p style="padding-left:40px;margin-bottom: 0cm;"><strong> For example =&gt;</strong></p>
<p style="padding-left:45px;margin-bottom: 0cm;">HTML HEAD TAG definition.</p>
<p style="padding-left:45px;margin-bottom: 0cm;">&lt;html xmlns=http://www.w3.org/1999/xhtml&gt;</p>
<p style="padding-left:50px;margin-bottom: 0cm;">&lt;head&gt;</p>
<p style="padding-left:55px;margin-bottom: 0cm;">&lt;meta http-equiv=&#8217;content-type&#8217; content=&#8217;text/html; charset=UTF-8&#8242;&gt;</p>
<p style="padding-left:55px;margin-bottom: 0cm;">&lt;title&gt;<span style="font-family: DejaVu Sans;">الاختبار</span>&lt;/title&gt;</p>
<p style="padding-left:50px;margin-bottom: 0cm;">&lt;/head&gt;</p>
<p style="padding-left:50px;margin-bottom: 0cm;">&lt;body dir=&#8217;rtl&#8217;&gt;</p>
<p style="padding-left:55px;margin-bottom: 0cm;"><span style="font-family: DejaVu Sans;"> الاختبار<br />
</span></p>
<p style="padding-left:50px;margin-bottom: 0cm;">&lt;/body&gt;</p>
<p style="padding-left:45px;margin-bottom: 0cm;">&lt;/html&gt;</p>
<ul>
<li> How to convert direction in html for Arabic ?</li>
</ul>
<p style="padding-left:50px;margin-bottom: 0cm;text-align:justify;">Arabic script is written from right to left direction of the page so to Display Arabic content use dir=&#8217;rtl&#8217; attribute in html tag or direction=&#8217;rtl&#8217;   for css/inline style sheet. It is always right aligned.</p>
<p style="margin-bottom: 0cm;"><!-- 		@page { size: 21cm 29.7cm; margin: 2cm } 		P { margin-bottom: 0.21cm } --></p>
<p style="padding-left:50px;margin-bottom: 0cm;"><strong>For example </strong></p>
<p style="padding-left:50px;margin-bottom: 0cm;">&lt;html xmlns=http://www.w3.org/1999/xhtml&gt;</p>
<p style="padding-left:55px;margin-bottom: 0cm;">&lt;head&gt;</p>
<p style="padding-left:60px;margin-bottom: 0cm;">&lt;meta http-equiv=&#8217;content-type&#8217; content=&#8217;text/html; charset=UTF-8&#8242;&gt;</p>
<p style="padding-left:65px;margin-bottom: 0cm;">&lt;title&gt;<span style="font-family: DejaVu Sans;">الاختبار</span>&lt;/title&gt;</p>
<p style="padding-left:55px;margin-bottom: 0cm;">&lt;body dir=&#8217;rtl&#8217;&gt;</p>
<p style="padding-left:60px;margin-bottom: 0cm;">&lt;div style=&#8217;<span class="cssPropName editable">direction</span><span class="cssColon">:</span><span class="cssPropValue editable">rtl</span><span class="cssSemi">;</span>&#8216;&gt;</p>
<p style="padding-left:65px;margin-bottom: 0cm;"><span style="font-family: DejaVu Sans;">الاختبار</span></p>
<p style="padding-left:60px;margin-bottom: 0cm;">&lt;/div&gt;</p>
<p style="padding-left:60px;margin-bottom: 0cm;">&lt;table dir=”rtl”&gt;</p>
<p style="padding-left:65px;margin-bottom: 0cm;">&lt;tr&gt;</p>
<p style="padding-left:70px;margin-bottom: 0cm;">&lt;td align=&#8217;right&#8217;&gt;<span style="font-family: DejaVu Sans;">الاختبار</span>&lt;/td&gt;</p>
<p style="padding-left:65px;margin-bottom: 0cm;">&lt;/tr&gt;</p>
<p style="padding-left:60px;margin-bottom: 0cm;">&lt;/table&gt;</p>
<p style="padding-left:55px;margin-bottom: 0cm;">&lt;/body&gt;</p>
<p style="padding-left:50px;margin-bottom: 0cm;">&lt;/html&gt;</p>
<p style="margin-bottom: 0cm;"><!-- 		@page { size: 21cm 29.7cm; margin: 2cm } 		P { margin-bottom: 0.21cm } --></p>
<ul>
<li>Which format of Arabic words are displayed properly and in readable format ?</li>
</ul>
<p><!-- 		@page { size: 21cm 29.7cm; margin: 2cm } 		P { margin-bottom: 0.21cm } --></p>
<p style="padding-left:50px;margin-bottom: 0cm;">Use Font to display Arabic words in “Tahoma: font size 12”.</p>
<p style="margin-bottom: 0cm;"><!-- 		@page { size: 21cm 29.7cm; margin: 2cm } 		P { margin-bottom: 0.21cm } --></p>
<p style="padding-left:50px;margin-bottom: 0cm;"><strong>For example </strong></p>
<p style="padding-left:55px;margin-bottom: 0cm;">&lt;html xmlns=http://www.w3.org/1999/xhtml&gt;</p>
<p style="padding-left:60px;margin-bottom: 0cm;">&lt;head&gt;</p>
<p style="padding-left:65px;margin-bottom: 0cm;">&lt;meta http-equiv=&#8217;content-type&#8217; content=&#8217;text/html; charset=UTF-8&#8242;&gt;</p>
<p style="padding-left:60px;margin-bottom: 0cm;">&lt;title&gt;<span style="font-family: DejaVu Sans;">الاختبار</span>&lt;/title&gt;</p>
<p style="padding-left:60px;margin-bottom: 0cm;">&lt;body dir=”rtl” style=”font-size:12px;font-family:Tahoma,Arial;”&gt;</p>
<p style="padding-left:65px;margin-bottom: 0cm;">&lt;div style=”direction:rtl;text-align:right;”&gt;<span style="font-family: DejaVu Sans;">الاختبار</span>&lt;/div&gt;</p>
<p style="padding-left:60px;margin-bottom: 0cm;">&lt;/body&gt;</p>
<p style="padding-left:55px;margin-bottom: 0cm;">&lt;/html&gt;</p>
<p><!-- 		@page { size: 21cm 29.7cm; margin: 2cm } 		P { margin-bottom: 0.21cm } --></p>
<ul>
<li>How to save Arabic data in MySQL or database ?</li>
</ul>
<p><!-- 		@page { size: 21cm 29.7cm; margin: 2cm } 		P { margin-bottom: 0.21cm } --></p>
<p style="padding-left:50px;margin-bottom: 0cm;">Use following step to insert, save and retrieve Arabic data.</p>
<p style="padding-left:50px;margin-bottom: 0cm;"><strong>Step &#8211; 1</strong> Table <strong>collection</strong> should be in “utf8_unicode_ci”</p>
<p style="padding-left:50px;margin-bottom: 0cm;"><strong>Step &#8211; 2</strong> Field <strong>collection</strong> should be in “utf8_unicode_ci”</p>
<p style="padding-left:50px;margin-bottom: 0cm;"><strong>Step &#8211; 3</strong> Use following code after connection with database. it will</p>
<p style="padding-left:60px;margin-bottom: 0cm;">set MySQL server in “utf8 character set”.</p>
<p style="padding-left:60px;margin-bottom: 0cm;"><strong>mysql_query(&#8220;SET NAMES &#8216;utf8&#8242;&#8221;); </strong></p>
<p style="padding-left:50px;margin-bottom: 0cm;">For Ref:<a href="http://dev.mysql.com/doc/refman/5.0/en/charset-unicode-sets.html">http://dev.mysql.com/doc/refman/5.0/en/charset-unicode-sets.html</a></p>
<p style="margin-bottom: 0cm;"><!-- 		@page { size: 21cm 29.7cm; margin: 2cm } 		P { margin-bottom: 0.21cm } --></p>
<ul>
<li>
<p style="margin-bottom: 0cm;">How to search Arabic word in php 	scripts?</p>
<p style="margin-bottom: 0cm;">or</p>
<p style="margin-bottom: 0cm;">How to develop Arabic search 	functionality in php scripts ?</p>
</li>
</ul>
<p><!-- 		@page { size: 21cm 29.7cm; margin: 2cm } 		P { margin-bottom: 0.21cm } --></p>
<p style="padding-left:50px;margin-bottom: 0cm;">If you are not storing data in UTF-8 then you must use “urlencode” and   “urldecode” function</p>
<p style="padding-left:50px;margin-bottom: 0cm;"><strong>For example </strong></p>
<p style="padding-left:60px;margin-bottom: 0cm;"><strong>At the time of request.</strong></p>
<p style="padding-left:65px;margin-bottom: 0cm;">$keyword = urldecode($_POST['keyword']);</p>
<p style="padding-left:65px;margin-bottom: 0cm;">SELECT * FROM &lt;table_name&gt; WHERE &lt;Field Name&gt; LIKE &#8216;%$keyword%&#8217;</p>
<p style="padding-left:60px;margin-bottom: 0cm;"><strong>At the time of redirect.</strong></p>
<p style="padding-left:65px;margin-bottom: 0cm;">$keyword = urlencode($keyword);</p>
<p style="margin-bottom: 0cm;"><strong> </strong></p>
<p style="padding-left:65px;margin-bottom: 0cm;"><strong>header(&#8216;location: file.php?keyword=$keyword&#8217;); </strong></p>
<p style="padding-left:70px;margin-bottom: 0cm;">or</p>
<p style="padding-left:65px;margin-bottom: 0cm;">&lt;script type=&#8217;text/javascript&#8217;&gt;</p>
<p style="padding-left:70px;margin-bottom: 0cm;">window.location.href = “file.php?keyword=&lt;?=$keyword?&gt;”;</p>
<p style="padding-left:65px;margin-bottom: 0cm;">&lt;/script&gt;</p>
<p style="margin-bottom: 0cm;"><!-- 		@page { size: 21cm 29.7cm; margin: 2cm } 		P { margin-bottom: 0.21cm } --></p>
<ul>
<li>Suggestion for multi language application setup</li>
</ul>
<p style="margin-bottom: 0cm;"><!-- 		@page { size: 21cm 29.7cm; margin: 2cm } 		P { margin-bottom: 0.21cm } --></p>
<p style="padding-left:50px;margin-bottom: 0cm;">For example English and Arabic</p>
<p style="padding-left:60px;margin-bottom: 0cm;"><strong>1</strong>.  Use prefix/LANG_CODE &#8220;ar_&#8221; and &#8220;en_&#8221; concat with field name.&lt;/</p>
<p style="margin-bottom: 0cm;"> </p>
<p style="padding-left:60px;margin-bottom: 0cm;"><strong>2</strong>.  Query format</p>
<p style="padding-left:80px;margin-bottom: 0cm;">SELECT LANG_CODE.&#8221;field1&#8243;, LANG_CODE.&#8221;field2&#8243;,&#8230;.</p>
<p style="padding-left:60px;margin-bottom: 0cm;"><strong>3</strong> Multi language application folder structure. It is better that you should store css and images in different folder.</p>
<p style="padding-left:65px;margin-bottom: 0cm;"><strong>For example </strong></p>
<p style="padding-left:65px;margin-bottom: 0cm;">Folder Structure</p>
<p style="padding-left:65px;margin-bottom: 0cm;">-CSS_EN</p>
<p style="padding-left:70px;margin-bottom: 0cm;">-CSS_AR</p>
<p style="padding-left:70px;margin-bottom: 0cm;">-IMAGES_EN</p>
<p style="padding-left:70px;margin-bottom: 0cm;">-IMAGES_AR</p>
<p style="padding-left:60px;margin-bottom: 0cm;"><strong>4</strong>. Words module</p>
<p style="padding-left:70px;margin-bottom: 0cm;">- Give rights  to administrator to edit Arabic and English word to rectify any mistake, if any.</p>
<p style="padding-left:70px;margin-bottom: 0cm;">- For retrieve data rapidly must store all Arabic and English word in  .xml file.</p>
<p style="padding-left:70px;margin-bottom: 0cm;"><strong>For example </strong></p>
<p style="padding-left:70px;margin-bottom: 0cm;">&lt;?xml version=&#8217;1.0&#8242; encoding=&#8217;UTF-8&#8242;?&gt;</p>
<p style="padding-left:70px;margin-bottom: 0cm;">&lt;lang&gt;</p>
<p style="padding-left:75px;margin-bottom: 0cm;">&lt;words&gt;</p>
<p style="padding-left:80px;margin-bottom: 0cm;">&lt;word  id=&#8221;1&#8243; english=&#8221;Sign In&#8221; arabic=&#8221;<span style="font-family: DejaVu Sans;">تسجيل</span>&#8220;&gt;&lt;/word&gt;</p>
<p style="padding-left:75px;margin-bottom: 0cm;">&lt;/words&gt;</p>
<p style="padding-left:70px;margin-bottom: 0cm;">&lt;/lang&gt;</p>
<p style="padding-left:70px;margin-bottom: 0cm;">Create PHP constant file for words.</p>
<p style="padding-left:75px;margin-bottom: 0cm;">ar_words.php</p>
<p style="padding-left:80px;margin-bottom: 0cm;">&lt;?php</p>
<p style="padding-left:85px;margin-bottom: 0cm;"><span style="font-size: x-small;">define(SIGNIN,trim(str_replace(&#8216;#&#8217;,'&amp;#&#8217;,$p-&gt;output['0']['child'][0]['child'][3]['attrs']['ARABIC'])),&#8221; &#8220;); </span></p>
<p style="padding-left:75px;margin-bottom: 0cm;">?&gt;</p>
<p style="padding-left:75px;margin-bottom: 0cm;">en_words.php</p>
<p style="padding-left:75px;margin-bottom: 0cm;">&lt;?php</p>
<p style="padding-left:80px;margin-bottom: 0cm;"><span style="font-size: x-small;">define(SIGNIN,$p-&gt;output['0']['child'][0]['child'][3]['attrs']['ENGLISH']); </span></p>
<p style="padding-left:75px;margin-bottom: 0cm;">?&gt;</p>
<p>Let us know if you feel some important points are missing here.</p>
<p> </p>
<p style="margin-bottom: 0cm;"> </p>
]]></content:encoded>
			<wfw:commentRss>http://dev.digi-corp.com/2009/05/things-to-take-care-while-developing-arabic-sites-and-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working with Arabic Language</title>
		<link>http://dev.digi-corp.com/2009/04/working-with-arabic-language/</link>
		<comments>http://dev.digi-corp.com/2009/04/working-with-arabic-language/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 12:59:22 +0000</pubDate>
		<dc:creator>vishal.parmar</dc:creator>
				<category><![CDATA[Arabic]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Arabic email]]></category>
		<category><![CDATA[email in arabic]]></category>
		<category><![CDATA[html in arabic]]></category>
		<category><![CDATA[UTF-8]]></category>
		<category><![CDATA[work with Arabic]]></category>

		<guid isPermaLink="false">http://dev.digi-corp.com/?p=121</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>We have lot of clients in Middle East and thus we have to develop almost all the projects in English and Arabic.</p>
<p>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.</p>
<p>Following are couple of issues you may come across working with Arabic but there are also simple solutions to them as explained below.</p>
<p><strong>(1) Sending email in Arabic </strong></p>
<p>Sometimes we find that Arabic mail is displayed properly in gmail,yahoo etc but they dont look ok in Outlook, Zimbra.</p>
<p>Instead of Arabic junk data like following comes in email:</p>
<p>áã íÊã ÝÊÍ ãáÝ ÇáÞÇáÈáã íÊã ÝÊÍ ãáÝ ÇáÞÇáÈ<br />
áã íÊã ÝÊÍ ãáÝ ÇáÞÇáÈáã íÊã ÝÊÍ ãáÝ ÇáÞÇáÈ</p>
<p>Solution to this problem is very simple</p>
<p><em>You just need to set mail header charset as UTF-8 intead of iso-8859-1.</em></p>
<p>PHP example:</p>
<p>$headers  = &#8216;MIME-Version: 1.0&#8242; . &#8220;\r\n&#8221;;<br />
$headers .= &#8216;Content-type: text/html;<strong> charset=UTF-8</strong>&#8216; . &#8220;\r\n&#8221;;</p>
<p><strong>(2) To display HTML page in Arabic Language</strong></p>
<p>&lt;html xmlns=&#8221;<span class="Object"><a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a></span>&#8220;&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv=&#8221;content-type&#8221; content=&#8221;text/html;<strong> charset=UTF-8</strong>&#8220;&gt;</p>
<p>I hope this may help you someday when you are stuck.</p>
<p>Would you like to share some of your tips about working with Arabic language here? please write them in comments.</p>
<p>Thanks.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.digi-corp.com/2009/04/working-with-arabic-language/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

