Click here to Skip to main content
15,867,686 members
Please Sign up or sign in to vote.
5.00/5 (3 votes)
See more:
Friends,

I am new here and this is my first question: I hope your experts will help me.

I am running a PHP website, but when I post something in Arabic then the site does not support Arabic, it supports only English.

My tables, database everything is fine UFT8 Unicode added but still my site does not support other languages.

Please, what can I do now and what should I add in my script so that it can support Arabic and other languages as well?

Now if I post something in Arabic or Persian then showing some strange symbols in site does not show the correct words.

Please help me out if possible would be grateful.

Regards

Iamurs.

Original Question Here[^]

[EDIT]Added PHP tag[/EDIT]
Posted
Updated 31-Aug-10 23:18pm
v4
Comments
Dalek Dave 1-Sep-10 4:58am    
Note: Posted on Behalf of Iamurs, who asked this Question in an Answer Section of another Question.
Killzone DeathMan 3-Jul-14 10:45am    
If you want a quick way:
http://support.jimdo.com/tutorials/apps-and-plugins/how-to-add-google-translate-to-your-website/

maybe you are echo something before
HTML
<meta charset="utf-8">

and did you set charset for fetching data from database?

PHP
try {
    $db = new PDO("mysql:host=localhost;dbname=dbname","root","");

<pre>
$db->exec("SET NAMES 'utf8'"); # <=== THIS
$db->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);


} catch (Exception $e) {
echo "Can not connect to Database!";
exit;
}
 
Share this answer
 
maybe you just don't have installed the arabian charset on your pc?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900