多语言支持&救命 [英] Multi Language Support & Help

查看:71
本文介绍了多语言支持&救命的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友,



我是新来的,这是我的第一个问题:我希望你的专家能帮助我。



我正在运行一个PHP网站,但是当我用阿拉伯语发帖时,该网站不支持阿拉伯语,它只支持英语。



我的表,数据库一切都很好UFT8 Unicode添加但仍然我的网站不支持其他语言。



请,我现在可以做什么,我应该在我的脚本中添加什么所以它也可以支持阿拉伯语和其他语言吗?



现在,如果我用阿拉伯语或波斯语发布一些内容,那么在网站上显示一些奇怪的符号就不会显示正确的单词。



请尽可能帮助我。如果可能,我会感激不尽。



问候



Iamurs。



原始问题在这里 [ ^ ]



添加了PHP标签[/ EDIT]

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[^]

Added PHP tag[/EDIT]

推荐答案

也许你在
<meta charset="utf-8">



你是否设置了charset来从数据库中获取数据?




and did you set charset for fetching data from database?

try {
    


db = new PDO( mysql: host = localhost; dbname = dbname root, );

< pre > ;
db = new PDO("mysql:host=localhost;dbname=dbname","root",""); <pre>


db-> exec(SET NAMES'utf8'); #< = == THIS

< span class =code-attribute>
db->exec("SET NAMES 'utf8'"); # <=== THIS


这篇关于多语言支持&amp;救命的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆