<?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>Learning Is Fun &#187; Uncategorized</title>
	<atom:link href="http://www.tanzilo.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tanzilo.com</link>
	<description>Talks on Web Technology and Better Product Development</description>
	<lastBuildDate>Sat, 17 Jan 2009 22:17:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>PHP &amp; MySQL: Creating a website in your local language smoothly</title>
		<link>http://www.tanzilo.com/2008/12/29/php-mysql-creating-a-website-in-your-local-language-smoothly/</link>
		<comments>http://www.tanzilo.com/2008/12/29/php-mysql-creating-a-website-in-your-local-language-smoothly/#comments</comments>
		<pubDate>Mon, 29 Dec 2008 12:04:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Afrikaans]]></category>
		<category><![CDATA[Albanian]]></category>
		<category><![CDATA[Amharic]]></category>
		<category><![CDATA[Arabic]]></category>
		<category><![CDATA[Armenian]]></category>
		<category><![CDATA[Assamese]]></category>
		<category><![CDATA[Aymara]]></category>
		<category><![CDATA[Azeri]]></category>
		<category><![CDATA[Belarusian]]></category>
		<category><![CDATA[Bengali]]></category>
		<category><![CDATA[Bislama]]></category>
		<category><![CDATA[Bosnian]]></category>
		<category><![CDATA[Bulgarian]]></category>
		<category><![CDATA[Burmese]]></category>
		<category><![CDATA[Catalan]]></category>
		<category><![CDATA[Chinese]]></category>
		<category><![CDATA[Creating]]></category>
		<category><![CDATA[Croatian]]></category>
		<category><![CDATA[Czech]]></category>
		<category><![CDATA[Danish]]></category>
		<category><![CDATA[Dari]]></category>
		<category><![CDATA[Develop]]></category>
		<category><![CDATA[Dhivehi]]></category>
		<category><![CDATA[Dutch]]></category>
		<category><![CDATA[Dzongkha]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[Esperanto]]></category>
		<category><![CDATA[Estonian]]></category>
		<category><![CDATA[Fijian]]></category>
		<category><![CDATA[Filipino]]></category>
		<category><![CDATA[Finnish]]></category>
		<category><![CDATA[French]]></category>
		<category><![CDATA[Frisian]]></category>
		<category><![CDATA[Gagauz]]></category>
		<category><![CDATA[Georgian]]></category>
		<category><![CDATA[German]]></category>
		<category><![CDATA[Greek]]></category>
		<category><![CDATA[Guaraní]]></category>
		<category><![CDATA[Gujarati]]></category>
		<category><![CDATA[Haitian Creole]]></category>
		<category><![CDATA[Hebrew]]></category>
		<category><![CDATA[Hindi]]></category>
		<category><![CDATA[Hiri Motu]]></category>
		<category><![CDATA[Hungarian]]></category>
		<category><![CDATA[Icelandic]]></category>
		<category><![CDATA[Indonesian]]></category>
		<category><![CDATA[Italian]]></category>
		<category><![CDATA[Japanese]]></category>
		<category><![CDATA[Kannada]]></category>
		<category><![CDATA[Kashmiri]]></category>
		<category><![CDATA[Kazakh]]></category>
		<category><![CDATA[Khmer]]></category>
		<category><![CDATA[Korean]]></category>
		<category><![CDATA[Kurdish]]></category>
		<category><![CDATA[Kyrgyz]]></category>
		<category><![CDATA[Lao]]></category>
		<category><![CDATA[Latvian]]></category>
		<category><![CDATA[Lithuanian]]></category>
		<category><![CDATA[local language]]></category>
		<category><![CDATA[Luxembourgish]]></category>
		<category><![CDATA[Macedonian]]></category>
		<category><![CDATA[Malagasy]]></category>
		<category><![CDATA[Malay]]></category>
		<category><![CDATA[Malayalam]]></category>
		<category><![CDATA[Maltese]]></category>
		<category><![CDATA[Mandarin]]></category>
		<category><![CDATA[Māori]]></category>
		<category><![CDATA[Marathi]]></category>
		<category><![CDATA[Mayan]]></category>
		<category><![CDATA[Moldovan]]></category>
		<category><![CDATA[Mongolian]]></category>
		<category><![CDATA[Montenegrin]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Náhuatl]]></category>
		<category><![CDATA[Ndebele]]></category>
		<category><![CDATA[Nepali]]></category>
		<category><![CDATA[New Zealand Sign Language]]></category>
		<category><![CDATA[Northern Sotho]]></category>
		<category><![CDATA[Norwegian]]></category>
		<category><![CDATA[Oriya]]></category>
		<category><![CDATA[Papiamento]]></category>
		<category><![CDATA[Pashto]]></category>
		<category><![CDATA[Persian]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Polish]]></category>
		<category><![CDATA[Portuguese]]></category>
		<category><![CDATA[Punjabi]]></category>
		<category><![CDATA[Quechua]]></category>
		<category><![CDATA[Rhaeto-Romansh]]></category>
		<category><![CDATA[Romanian]]></category>
		<category><![CDATA[Russian]]></category>
		<category><![CDATA[Sanskrit]]></category>
		<category><![CDATA[Serbian]]></category>
		<category><![CDATA[Shona]]></category>
		<category><![CDATA[Sindhi]]></category>
		<category><![CDATA[Sinhala]]></category>
		<category><![CDATA[Slovak]]></category>
		<category><![CDATA[Slovene]]></category>
		<category><![CDATA[Somali]]></category>
		<category><![CDATA[Sotho]]></category>
		<category><![CDATA[Spanish]]></category>
		<category><![CDATA[Swahili]]></category>
		<category><![CDATA[Swati]]></category>
		<category><![CDATA[Swedish]]></category>
		<category><![CDATA[Tagalog]]></category>
		<category><![CDATA[Tajik]]></category>
		<category><![CDATA[Tamil]]></category>
		<category><![CDATA[Telugu]]></category>
		<category><![CDATA[Tetum]]></category>
		<category><![CDATA[Thai]]></category>
		<category><![CDATA[Tok Pisin]]></category>
		<category><![CDATA[Tsonga]]></category>
		<category><![CDATA[Tswana]]></category>
		<category><![CDATA[Turkish]]></category>
		<category><![CDATA[Turkmen]]></category>
		<category><![CDATA[Ukrainian]]></category>
		<category><![CDATA[Urdu]]></category>
		<category><![CDATA[Uzbek]]></category>
		<category><![CDATA[Venda]]></category>
		<category><![CDATA[Vietnamese]]></category>
		<category><![CDATA[website]]></category>
		<category><![CDATA[Welsh]]></category>
		<category><![CDATA[Xhosa]]></category>
		<category><![CDATA[Yiddish]]></category>
		<category><![CDATA[Zulu]]></category>

		<guid isPermaLink="false">http://www.tanzilo.com/?p=63</guid>
		<description><![CDATA[Hello Developer, You know English is the international language and accepted as international communication. So, most of the websites have been developed in English. But in many other times, a developer needs to work with local languages where they are developing a website in PHP. If you develop in local language, you need to know [...]]]></description>
			<content:encoded><![CDATA[<p>Hello Developer,</p>
<p>You know English is the international language and accepted as international communication. So, most of the websites have been developed in English. But in many other times, a developer needs to work with local languages where they are developing a website in PHP. If you develop in local language, you need to know a small trick and that will show your content properly in all browsers smoothly.</p>
<p>So, what is the technique?</p>
<p>Well. Let me explain step by step.</p>
<p><span style="text-decoration: underline;"><strong>Step One: An observation</strong></span><br />
I will show you the source code of two Bengali newspaper. In this newspaper: <a title="Prothom Alo" href="http://www.prothom-alo.com/" target="_blank">http://www.prothom-alo.com</a>, the fonts and text comes properly in all browsers. But in this newspaper: <a title="Ittefaq" href="http://www.ittefaq.com" target="_blank">http://www.ittefaq.com</a>, it can show text and fonts properly only in Internet Explorer.</p>
<p>Now the matter is we must make sure our content will be displayed properly in any browser. Right?</p>
<p>OK. So what is the difference between the two websites I just gave example?</p>
<p>If you take a look at the source code of the first website&#8217;s content, you will find it is like this:<span style="text-decoration: underline;">&amp;<span class="entity">#2488;</span>&amp;<span class="entity">#2691;</span>&amp;<span class="entity">#2474;</span>&amp;<span class="entity">#2494;</span>&amp;<span class="entity">#2470;</span>&amp;<span class="entity">#2453;</span></span></p>
<p>This is another website that had been developed as smooth site in the same technique: <a title="bdnews 24" href="http://www.bdnews24.com/bangla" target="_blank">http://www.bdnews24.com/bangla</a>. If you check its code, you will see that it uses same type of code for its text.</p>
<p>So, what are these <span style="text-decoration: underline;">&amp;<span class="entity">#2474;</span>&amp;<span class="entity">#2494;</span>&amp;<span class="entity">#2470;</span>&amp;<span class="entity">#2453;</span>&amp;<span class="entity">#2496;</span>&amp;</span><span class="entity"><span style="text-decoration: underline;">#2527;</span> things? It is very interesting that these are universal representation of local language in HTML entities. For every character of any local language, there is a unique and fixed symbol defined such as </span><span style="text-decoration: underline;">&amp;<span class="entity">#2474;</span></span><span class="entity"> in HTML entities</span><span class="entity">. When you bring this kind of text in your browser source code, the site content looks smooth without any break and fonts displays properly.</span></p>
<p>Now if you open the source code of <a title="Ittefaq" href="http://www.ittefaq.com" target="_blank">http://www.ittefaq.com</a>, you will see something like <span style="text-decoration: underline;">AvR beg RvZxq msm` wbe©vP‡b jovB n‡e †RvU-gnv‡Rv‡Ui g‡a¨</span>. The matter is they are also showing Bengali news content, but in a different way that is not useful in cross-broswer platform. This is often totally recognized by only Internet Explorer and often partially recognized by other browsers.</p>
<p><span style="text-decoration: underline;"><strong>Step Two: Storing your local language content in the database</strong></span><br />
You see I have some content in my local language (Bangla) in the database.</p>
<p><a href="http://www.tanzilo.com/wp-content/uploads/2008/12/bangla_news_content.jpg"><img class="alignleft size-full wp-image-64" style="float:none;" title="bangla_news_content" src="http://www.tanzilo.com/wp-content/uploads/2008/12/bangla_news_content.jpg" alt="" width="500" height="174" /></a></p>
<p><span style="text-decoration: underline;"><strong>Step Three: Converting your local language text in Universal code</strong></span><br />
Well. This is extremely easy.</p>
<pre class="php">
<span class="phpScriptTag"><span class="phpOperator">&lt;</span><span class="phpOperator">?</span>php</span>
	<span class="phpKeyword">class </span><span class="htmlText">UnicodeHandler</span>
	<span class="phpOperator">{</span>
	<span class="phpKeyword">	var </span>$dbLink<span class="phpText">;</span>
	<span class="phpKeyword">	var </span>$sqlQuery<span class="phpText">;</span>
	<span class="phpKeyword">	var </span>$dbResult;
	<span class="phpKeyword">	var </span>$dbRow<span class="phpText">;</span>
	<span class="phpKeyword">	var </span>$salary<span class="phpText">;</span>
	<span class="phpKeyword">	var </span>$bonus<span class="phpText">;</span>
		<span class="phpComment">/* Use this constructor in<span class="phpKeyword"> case </span><span class="htmlText">your PHP version is </span><span class="phpNumber">4</span><span class="phpOperator">.</span> */</span>
<span class="phpComment">/*
		<span class="phpFunctionKeyword">function</span><span class="htmlText"> UnicodeHandler</span><span class="phpOperator">(</span><span class="phpOperator">)</span>
		<span class="phpOperator">{</span>
			<span class="phpScriptVar">$this</span><span class="phpOperator">-<span class="phpOperator">&gt;</span></span><span class="htmlText">dbLink </span><span class="phpOperator">=</span> <span class="phpString">''</span><span class="phpText">;</span>
			<span class="phpScriptVar">$this</span><span class="phpOperator">-<span class="phpOperator">&gt;</span></span><span class="htmlText">sqlQuery </span><span class="phpOperator">=</span> <span class="phpString">''</span><span class="phpText">;</span>
			<span class="phpScriptVar">$this</span><span class="phpOperator">-<span class="phpOperator">&gt;</span></span><span class="htmlText">dbResult </span><span class="phpOperator">=</span> <span class="phpString">''</span><span class="phpText">;</span>
			<span class="phpScriptVar">$this</span><span class="phpOperator">-<span class="phpOperator">&gt;</span></span><span class="htmlText">dbRow </span><span class="phpOperator">=</span> <span class="phpString">''</span><span class="phpText">;</span>
			<span class="phpScriptVar">$this</span><span class="phpOperator">-<span class="phpOperator">&gt;</span></span><span class="htmlText">mySalary </span><span class="phpOperator">=</span> 0;
			<span class="phpScriptVar">$this</span><span class="phpOperator">-<span class="phpOperator">&gt;</span></span><span class="htmlText">myBonus </span><span class="phpOperator">=</span> 0;
			<span class="phpScriptVar">$this</span><span class="phpOperator">-<span class="phpOperator">&gt;</span></span><span class="htmlText">dbLink </span><span class="phpOperator">=</span> <span class="phpFunction">mysql_connect</span><span class="phpOperator">(</span><span class="phpString">'localhost'</span>, <span class="phpString">'root'</span>, <span class="phpString">''</span><span class="phpOperator">)</span><span class="phpText">;</span>
			<span class="phpFunction">mysql_query</span><span class="phpOperator">(</span><span class="phpString">"SET character_set_results=utf8"</span>, <span class="phpScriptVar">$this</span><span class="phpOperator">-<span class="phpOperator">&gt;</span></span><span class="htmlText">dbLink</span><span class="phpOperator">)</span><span class="phpText">;</span>
			<span class="phpFunction">mb_language</span><span class="phpOperator">(</span><span class="phpString">'uni'</span><span class="phpOperator">)</span><span class="phpText">;</span>
			<span class="phpFunction">mb_internal_encoding</span><span class="phpOperator">(</span><span class="phpString">'UTF-<span class="phpNumber">8</span>'</span><span class="phpOperator">)</span><span class="phpText">;</span>
			<span class="phpFunction">mysql_select_db</span><span class="phpOperator">(</span><span class="phpString">'test'</span>, <span class="phpScriptVar">$this</span><span class="phpOperator">-<span class="phpOperator">&gt;</span></span><span class="htmlText">dbLink</span><span class="phpOperator">)</span><span class="phpText">;</span>
			<span class="phpFunction">mysql_query</span><span class="phpOperator">(</span><span class="phpString">"set names <span class="phpString">'utf8'</span>"</span>,<span class="phpScriptVar">$this</span><span class="phpOperator">-<span class="phpOperator">&gt;</span></span><span class="htmlText">dbLink</span><span class="phpOperator">)</span><span class="phpText">;</span>
		<span class="phpOperator">}</span>
*/</span>
		<span class="phpComment">/* Use this constructor in<span class="phpKeyword"> case </span><span class="htmlText">your PHP version is </span><span class="phpNumber">5</span><span class="htmlText"> or </span><span class="phpNumber">5</span><span class="phpOperator">+</span>. */</span>
		<span class="phpComment">/* I assume you are using PHP <span class="phpNumber">5</span><span class="htmlText"> or </span><span class="phpNumber">5</span><span class="phpOperator">+</span>. */</span>
		<span class="phpFunctionKeyword">function</span><span class="htmlText"> __construct</span><span class="phpOperator">(</span><span class="phpOperator">)</span>
		<span class="phpOperator">{</span>
			<span class="phpScriptVar">$this</span><span class="phpOperator">-<span class="phpOperator">&gt;</span></span><span class="htmlText">dbLink </span><span class="phpOperator">=</span> <span class="phpString">''</span><span class="phpText">;</span>
			<span class="phpScriptVar">$this</span><span class="phpOperator">-<span class="phpOperator">&gt;</span></span><span class="htmlText">sqlQuery </span><span class="phpOperator">=</span> <span class="phpString">''</span><span class="phpText">;</span>
			<span class="phpScriptVar">$this</span><span class="phpOperator">-<span class="phpOperator">&gt;</span></span><span class="htmlText">dbResult </span><span class="phpOperator">=</span> <span class="phpString">''</span><span class="phpText">;</span>
			<span class="phpScriptVar">$this</span><span class="phpOperator">-<span class="phpOperator">&gt;</span></span><span class="htmlText">dbRow </span><span class="phpOperator">=</span> <span class="phpString">''</span><span class="phpText">;</span>
			<span class="phpScriptVar">$this</span><span class="phpOperator">-<span class="phpOperator">&gt;</span></span><span class="htmlText">mySalary </span><span class="phpOperator">=</span> 0;
			<span class="phpScriptVar">$this</span><span class="phpOperator">-<span class="phpOperator">&gt;</span></span><span class="htmlText">myBonus </span><span class="phpOperator">=</span> 0;
			<span class="phpScriptVar">$this</span><span class="phpOperator">-<span class="phpOperator">&gt;</span></span><span class="htmlText">dbLink </span><span class="phpOperator">=</span> <span class="phpFunction">mysql_connect</span><span class="phpOperator">(</span><span class="phpString">'localhost'</span>, <span class="phpString">'root'</span>, <span class="phpString">''</span><span class="phpOperator">)</span><span class="phpText">;</span>
			<span class="phpFunction">mysql_query</span><span class="phpOperator">(</span><span class="phpString">"SET character_set_results=utf8"</span>, <span class="phpScriptVar">$this</span><span class="phpOperator">-<span class="phpOperator">&gt;</span></span><span class="htmlText">dbLink</span><span class="phpOperator">)</span><span class="phpText">;</span>
			<span class="phpFunction">mb_language</span><span class="phpOperator">(</span><span class="phpString">'uni'</span><span class="phpOperator">)</span><span class="phpText">;</span>
			<span class="phpFunction">mb_internal_encoding</span><span class="phpOperator">(</span><span class="phpString">'UTF-<span class="phpNumber">8</span>'</span><span class="phpOperator">)</span><span class="phpText">;</span>
			<span class="phpFunction">mysql_select_db</span><span class="phpOperator">(</span><span class="phpString">'test'</span>, <span class="phpScriptVar">$this</span><span class="phpOperator">-<span class="phpOperator">&gt;</span></span><span class="htmlText">dbLink</span><span class="phpOperator">)</span><span class="phpText">;</span>
			<span class="phpFunction">mysql_query</span><span class="phpOperator">(</span><span class="phpString">"set names <span class="phpString">'utf8'</span>"</span>,<span class="phpScriptVar">$this</span><span class="phpOperator">-<span class="phpOperator">&gt;</span></span><span class="htmlText">dbLink</span><span class="phpOperator">)</span><span class="phpText">;</span>
		<span class="phpOperator">}</span>
		<span class="phpFunctionKeyword">function</span><span class="htmlText"> displayLocalContent</span><span class="phpOperator">(</span><span class="phpOperator">)</span>
		<span class="phpOperator">{</span>
			<span class="phpFunction">mysql_query</span><span class="phpOperator">(</span><span class="phpString">"SET character_set_results=utf8"</span>, <span class="phpScriptVar">$this</span><span class="phpOperator">-<span class="phpOperator">&gt;</span></span><span class="htmlText">dbLink</span><span class="phpOperator">)</span><span class="phpText">;</span>
			<span class="phpScriptVar">$this</span><span class="phpOperator">-<span class="phpOperator">&gt;</span></span><span class="htmlText">sqlQuery </span><span class="phpOperator">=</span> <span class="phpString">"SELECT * FROM unitext "</span><span class="phpText">;</span>
			<span class="phpScriptVar">$this</span><span class="phpOperator">-<span class="phpOperator">&gt;</span></span><span class="htmlText">dbResult </span><span class="phpOperator">=</span> <span class="phpFunction">mysql_query</span><span class="phpOperator">(</span><span class="phpScriptVar">$this</span><span class="phpOperator">-<span class="phpOperator">&gt;</span></span>sqlQuery, <span class="phpScriptVar">$this</span><span class="phpOperator">-<span class="phpOperator">&gt;</span></span><span class="htmlText">dbLink</span><span class="phpOperator">)</span><span class="phpText">;</span>
		<span class="phpKeyword">	while<span class="phpOperator">(</span></span><span class="phpScriptVar">$this</span><span class="phpOperator">-<span class="phpOperator">&gt;</span></span><span class="htmlText">dbRow </span><span class="phpOperator">=</span> <span class="phpFunction">mysql_fetch_object</span><span class="phpOperator">(</span><span class="phpScriptVar">$this</span><span class="phpOperator">-<span class="phpOperator">&gt;</span></span><span class="htmlText">dbResult</span><span class="phpOperator">)</span><span class="phpOperator">)</span>
			<span class="phpOperator">{</span>
				<span class="phpFunction">echo</span> <span class="phpString">'News<span class="phpOperator">:</span> '</span> <span class="phpOperator">.</span> <span class="phpScriptVar">$this</span><span class="phpOperator">-<span class="phpOperator">&gt;</span></span><span class="htmlText">convertToLocalHtml</span><span class="phpOperator">(</span><span class="phpScriptVar">$this</span><span class="phpOperator">-<span class="phpOperator">&gt;</span></span><span class="htmlText">dbRow</span><span class="phpOperator">-<span class="phpOperator">&gt;</span></span><span class="htmlText">news</span><span class="phpOperator">)</span> <span class="phpOperator">.</span> <span class="phpString">'<span class="phpOperator">&lt;</span>br /<span class="phpOperator">&gt;</span>'</span><span class="phpText">;</span>
			<span class="phpOperator">}</span>
		<span class="phpOperator">}</span>
		<span class="phpFunctionKeyword">function</span><span class="htmlText"> convertToLocalHtml</span><span class="phpOperator">(</span>$localHtmlEquivalent<span class="phpOperator">)</span>
		<span class="phpOperator">{</span>
			$localHtmlEquivalent <span class="phpOperator">=</span> <span class="phpFunction">mb_convert_encoding</span><span class="phpOperator">(</span>$localHtmlEquivalent,<span class="phpString">"HTML-ENTITIES"</span>,<span class="phpString">"UTF-<span class="phpNumber">8</span>"</span><span class="phpOperator">)</span><span class="phpText">;</span>
		<span class="phpKeyword">	return </span>$localHtmlEquivalent;
		<span class="phpOperator">}</span>
	<span class="phpOperator">}</span>
<span class="phpScriptTag"><span class="phpOperator">?</span><span class="phpOperator">&gt;</span></span>
</pre>
<p>The <span style="text-decoration: underline;">displayLocalContent()</span> function is going to display the news and <span style="text-decoration: underline;">convertToLocalHtml()</span> function converts my utf-8 content to HTML entities.</p>
<p>And here in <strong>index.php</strong> I am executing my <span style="text-decoration: underline;">displayLocalContent()</span> function.</p>
<pre class="php">
<span class="htmlOtherTag">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</span>
<span class="htmlOtherTag">&lt;html xmlns=<span class="htmlAttributeValue">&quot;http://www.w3.org/1999/xhtml&quot;</span>&gt;</span>
<span class="htmlOtherTag">&lt;head&gt;</span>
<span class="htmlOtherTag">&lt;meta http-equiv=<span class="htmlAttributeValue">&quot;Content-Type&quot;</span> content=<span class="htmlAttributeValue">&quot;text/html; charset=utf-8&quot;</span> /&gt;</span>
<span class="htmlOtherTag">&lt;title&gt;</span>Displaying Your Local Language<span class="htmlOtherTag">&lt;/title&gt;</span>
<span class="htmlOtherTag">&lt;/head&gt;</span>
<span class="htmlOtherTag">&lt;body&gt;</span>
<span class="phpScriptTag"><span class="phpOperator">&lt;</span><span class="phpOperator">?</span>php</span>
<span class="phpKeyword"><span class="phpKeyword">	include_once </span></span><span class="phpString">'<span class="phpKeyword">class<span class="phpOperator">.</span></span>unicode.php'</span><span class="phpText">;</span>
	$unicodeObject <span class="phpOperator">=</span><span class="phpKeyword"> new </span><span class="htmlText">UnicodeHandler</span><span class="phpOperator">(</span><span class="phpOperator">)</span><span class="phpText">;</span>
	$unicodeObject<span class="phpOperator">-<span class="phpOperator">&gt;</span></span><span class="htmlText">displayLocalContent</span><span class="phpOperator">(</span><span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpScriptTag"><span class="phpOperator">?</span><span class="phpOperator">&gt;</span></span>
<span class="htmlOtherTag">&lt;/body&gt;</span>
<span class="htmlOtherTag">&lt;/html&gt;</span>
</pre>
<p>As a result, the output is now as <span style="text-decoration: underline;">ঢাকা, ডিসে</span> etc.</p>
<p><span style="text-decoration: underline;"><strong>Step Four: You need to check my other posting for SELECT, INSERT &amp; UPDATE your local language.</strong></span><br />
Here goes my other article so that you can perform all required operations for storing and displaying information in browser smoothly:<br />
<a title="Php mysql unicode solution to chinese russian or any language" href="http://www.tanzilo.com/2008/10/13/php-mysql-unicode-solution-to-chinese-russian-or-any-language/" target="_blank">http://www.tanzilo.com/2008/10/13/php-mysql-unicode-solution-to-chinese-russian-or-any-language/</a></p>
<p><span style="text-decoration: underline;"><strong>An alternative way</strong></span><br />
I have an alternative way in my mind and that is when you store the data in the database, you can first convert them to universal code such as <span style="text-decoration: underline;">&amp;<span class="entity">#2453;</span>&amp;<span class="entity">#2496;</span>&amp;</span><span class="entity"><span style="text-decoration: underline;">#2527;</span></span>and then directly show your text.</p>
<p><strong>This article will cover any language such as</strong> Afrikaans, Albanian, Amharic, Arabic, Armenian, Assamese, Aymara, Azeri, Belarusian, Bengali, Bislama, Bosnian, Bulgarian, Burmese, Catalan, Chinese, Mandarin,Croatian, Czech, Danish, Dari, Dhivehi, Dutch, Dzongkha, English, Esperanto, Estonian, Fijian, Filipino, Finnish, French, Frisian,  Gagauz, Georgian, German, Greek, Guaraní, Gujarati, Haitian Creole, Hebrew, Hindi, Hiri Motu, Hungarian, Icelandic, Indonesian, Italian, Japanese, Kannada, Kashmiri, Kazakh, Khmer, Korean, Kurdish, Kyrgyz, Lao, Latvian, Lithuanian, Luxembourgish, Macedonian, Malagasy, Malay, Malayalam, Maltese, Māori, Marathi, Mayan, Moldovan, Mongolian, Montenegrin,Náhuatl, Ndebele, Nepali, New Zealand Sign Language, Northern Sotho, Norwegian, Oriya, Papiamento, Pashto, Persian, Polish, Portuguese, Punjabi, Quechua, Romanian, Rhaeto-Romansh, Russian, Sanskrit, Serbian, Shona, Sindhi, Sinhala, Slovak, Slovene, Somali, Sotho, Spanish, Swahili, Swati, Swedish, Tagalog, Tajik, Tamil, Telugu, Tetum, Thai, Tok Pisin, Tsonga, Tswana, Turkish, Turkmen, Ukrainian, Urdu, Uzbek, Venda, Vietnamese, Welsh, Xhosa, Yiddish, Zulu etc.</p>
<p>You can also download this small piece of code from here:<br />
<a title="convert to unicode" href="http://www.tanzilo.com/demo/code/convert_to_unicode/convert_to_unicode.zip" target="_blank">http://www.tanzilo.com/demo/code/convert_to_unicode/convert_to_unicode.zip</a></p>
<p>Thank you for reading.</p>
<p><map name='google_ad_map_63_eaab367e2f0158c1'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/63?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_63_eaab367e2f0158c1' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=63&amp;url= http%3A%2F%2Fwww.tanzilo.com%2F2008%2F12%2F29%2Fphp-mysql-creating-a-website-in-your-local-language-smoothly%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.tanzilo.com/2008/12/29/php-mysql-creating-a-website-in-your-local-language-smoothly/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
	</channel>
</rss>
