问题描述
我了解ICU的本地化部分-日期,时间和货币格式,归类等.谈到邮件翻译,我看到有人指出ICU不提供邮件翻译功能-例如检查.
I understand the localization part of ICU - date, time and currency formats, collation, etc. When it comes to message translation, I see people stating that ICU does not provide functionality for message translation - check for example this SOF question.
但是,当检查ICU文档时,我们发现它提供了资源包,并且该文档似乎暗示了将它们用于消息翻译:
However, when checking ICU docs, we find that it provides resources bundles, and the documentation does seem to hint to using them for message translation:
例如,在 PHP国际文档中:
此处的文档: http://userguide.icu-project.org/locale/resources 描述了类似于键值存储的功能,其文本源可以编译为二进制格式.
The documentation here: http://userguide.icu-project.org/locale/resourcesdescribes functionality similar to a key-value store, with text sources that can be compiled into binary format.
我的问题是ICU资源包(包括访问功能和存储格式)是否用于(或作为其目的的一部分)用于消息翻译(例如gettext和.po文件).如果是这样,是否有讨论此用法的资源或教程.
My question is whether ICU resource bundles (including the access functionality and the storage format) are meant for - or it is part of their purpose - to be used for message translation - for example like gettext and .po files are. If such, is there any resources or tutorials that discuss this usage.
还是改写:在其设计目标中,ICU是要与单独的消息翻译工具结合使用,还是要自己提供此类功能,或者这两种选择均可行?
Or a rewording: in its design goals, is the ICU meant to be used in conjunction with a separate message translation facility, or does it strive to provide such functionality itself, or is it that both options are possible.
推荐答案
是的,ICU资源束旨在用于检索消息.关于ICU,其他SOF问题的答案是错误的.您提供的链接是正确的,并且还提到将ICU资源束格式转换为XLIFF和从XLIFF转换出来. ICU还在 http://icu-project.org/apiref/icu4c/ucat_8h中提供了catgets()
样式包装器. html
Yes ICU resource bundles are meant to be used for the purpose of retrieving messages. The answer to the other SOF question is incorrect as regards ICU. The link you provided is correct, and also mentions converting ICU resource bundle formats in and out of XLIFF. ICU also provides a catgets()
style wrapper in http://icu-project.org/apiref/icu4c/ucat_8h.html
ICU不会阻止您使用单独的消息检索工具,但是它肯定是一个,并且以这种方式使用.
ICU wouldn't prevent you from using a separate message retrieval facility, but it is certainly meant to be one- and is used that way.
-史蒂芬(ICU)项目
-Steven, ICU project
编辑 ICU当前/官方没有 xgettext 类似于提取工具.也许那是区别的某些原因?
Edit ICU does not currently/officially have an xgettext like extraction facility. Perhaps that is some of the source of the distinction?
编辑2 中的更多详细信息: http://userguide.icu-project.org/语言环境/本地化
Edit 2 more details in: http://userguide.icu-project.org/locale/localizing
这篇关于是否将ICU资源包用于消息翻译资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!