使用什么进行本地化(php/smarty/pear应用程序)? [英] What to use for localization (php/smarty/pear application)?

查看:71
本文介绍了使用什么进行本地化(php/smarty/pear应用程序)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个php/smarty/pear应用程序,它具有自己的本地化实现,其中涉及对字符串使用id并将字符串存储在db中.目前,该应用程序仅以英语提供,但我将开始添加其他语言.当前的实现非常差,基本上我不喜欢重新发明轮子.

I have a php/smarty/pear app that has it's own localization implementation that involves using ids for strings and the strings are stored in a db. currently the app is only in English but I will start adding other languages. The current implementation is very poor and basically I'm not a big fan of re-inventing the wheel.

有人可以推荐用于本地化的内容吗?我几年前曾经使用过gettext,是仍然使用过还是有一些更新更好的东西?

Can anybody recommend what to use for localization? I had used gettext years ago, is that still used or is there something newer and better ?

提前谢谢.

推荐答案

我将使用gettext,因为它是一个成熟的系统,并提供单/复数版本的翻译等功能. 为了不依赖于php扩展的可用性,您应该使用 http://launchpad.net/php- gettext 提供了gettext的纯php实现.

I would use gettext, since it's a mature system and provides features like singular/plural versions of translations. To be not dependant on the availability of the php extension, you should fall back to http://launchpad.net/php-gettext which provides a pure php implementation of gettext.

gettext还具有很大的优势,即存在许多工具,可以轻松地翻译这些文件.

gettext has also the big advantage that dozens of tools exist that make it easy to translate those files.

这篇关于使用什么进行本地化(php/smarty/pear应用程序)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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