在php中进行国际化的最佳方法是什么? [英] what is the best way to do internationalization in php?

查看:110
本文介绍了在php中进行国际化的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于PHP-MySQL应用程序,处理国际化的最佳方法是什么?是否将数据保存在MySQL或平面文件中? PHP随附任何标准库吗?还是我需要编写自己的函数?

For a PHP-MySQL application, what is the best way to handle internationalization? Do I save the data in MySQL or flat files? Is there any standard library that comes with PHP or do I need to write my own functions?

推荐答案

使用新的 Internationalization 模块(如果您使用的是PHP 5.3).它使用与C/C ++和Java兼容的 ICU 库.

Use the new Internationalization module if you're using PHP 5.3. It uses the ICU library that's compatible with C/C++ and Java.

gettext()即将成为遗留代码.

这篇关于在php中进行国际化的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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