多语言站点-英语,日语,韩语 [英] Multilingual Site - English, Japanese, Korean Languages

查看:50
本文介绍了多语言站点-英语,日语,韩语的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

开发一个支持2字节语言(日语,中文)的网站难吗?我正计划使用PHP开发一个多语言站点.如果您知道一些简单的方法,请告诉我.

Is it that difficult to develop a site that supports 2 byte languages (Japanese, Chinese)? I am planning to develop a multilingual site using PHP. Kindly let me know, if you know some easy methods.

推荐答案

双字节"字符集已经成为过去(*).今天,您使用Unicode字符集,这样站点就可以无缝地支持每种语言,而不必担心切换代码页的麻烦.

‘Double-byte’ character sets are pretty much(*) a thing of the past. Today, you use the Unicode character set so a site can support every language seamlessly without the horror of switching code pages.

编写以UTF-8编码保存的页面内容,将其保存给浏览器作为UTF-8,并设置您的数据库表数据库连接到UTF-8.本身通常就足够了.如果您需要能够处理UTF-8字符串而不会意外地将字符截成两半,请使用 mbstring .

Write your page content saved in the UTF-8 encoding, serve it to browsers as UTF-8 and set your database tables and database connection to UTF-8. That's often enough in itself. If you need to be able to process UTF-8 strings without accidentally snipping a character in half, use mbstring.

(*:东亚仍然有一些可怕的旧系统需要编码为讨厌的旧字符集,例如旧手机和一些狡猾的网络邮件服务.希望这不会对您造成影响.情况下,您仍应在内部使用UTF-8进行所有操作,但在出局时使用 iconv 转换为例如Shift-JIS.)

(*: there are still a few horrible old systems in East Asia that you have to encode to nasty legacy character sets for, such as old mobile phones and some dodgy webmail services. Hopefully this won't affect you. In this case you should still use UTF-8 internally for everything, but use iconv to convert to eg. Shift-JIS on the way out.)

这篇关于多语言站点-英语,日语,韩语的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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