替代gettext? [英] Alternatives to gettext?

查看:85
本文介绍了替代gettext?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

gettext是否有通用的本地化/翻译替代方案?

Are there any general localization/translation alternatives to gettext?

开源或专有都无所谓.

当我说替代gettext时,是指国际化的库,具有各种本地化后端.

When I say alternative to gettext, I mean a library for internationalization, with a localization backend of sorts.

我问的原因是(除其他外)我发现gettext的方式有些麻烦且静态,主要是在后端位.

The reason I'm asking is because (among other things) I find the way gettext does things slightly cumbersome and static, mostly in the backend bit.

推荐答案

首先,我认为gettext是目前最好的解决方案之一.

First of all I think gettext is one of the best at this point.

您可以查看Boost.Locale,它可以提供更好的API并使用gettext的字典模型: http://cppcms.sourceforge.net/boost_locale/docs/(不是Boost的正式部分,还是beta).

You may take a look on Boost.Locale that may provide a better API and use gettext's dictionary model: http://cppcms.sourceforge.net/boost_locale/docs/ (not official part of Boost, still beta).

如果您不喜欢gettext ...

If you don't like gettext...

这些是翻译技术:

  • OASIS XLIFF
  • GNU gettext po/mo文件
  • POSIX目录
  • Qt ts/tm文件
  • Java属性,
  • Windows资源.

现在:

  • 最后两个废话...很难使用翻译和维护,不支持复数形式.
  • Qt ts/tm-需要使用Qt框架.与gettext具有非常相似的模型.不错的解决方案,但仅限于Qt.在通用程序中不太有用.
  • POSIX目录-没有人使用它们,不支持复数形式.废话.
  • OASIX XLIFF –标准"解决方案,取决于XML,甚至ICU都需要编译为特定的ICU资源才能使用.有限的翻译工具,我不知道任何支持XLIFF的库.复数形式不太容易使用(ICU仅在4.x版本中包含一些支持).
  • Last two total crap... Very hard to use translate and maintain, do not support plural forms.
  • Qt ts/tm -- requires usage of Qt framework. Have very similar model to gettext. Not bad solution, but limited to Qt. Not so useful in generic programs.
  • POSIX catalogs -- nobody uses them, no plural forms support. Crap.
  • OASIX XLIFF -- "standard" solution, depends on XML, even ICU requires compilation to specific ICU resources for use. Limited translation tools, I don't know any library that supports XLIFF. Plural forms not so easy to use (ICU included some support only in 4.x release).

现在我们有什么?

GNU gettext被广泛使用,具有出色的工具,具有强大的复数形式支持,在翻译者社区中非常受欢迎...

GNU gettext, widely used, has great tools, has great plural forms support, very popular in translators community...

所以决定,您真的认为gettext不是很好的解决方案吗?

So decide, do you really think that gettext is not so good solution?

我不这么认为.您根本没有使用其他解决方案,因此请首先了解它的工作原理.

I don't think so. You haven't worked with other solutions at all, so try to understand how it works at first place.

这篇关于替代gettext?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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