Angular2 i18n:使用XLIFF的原因是什么? [英] Angular2 i18n : What are the reasons for using XLIFF?

查看:65
本文介绍了Angular2 i18n:使用XLIFF的原因是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对为什么Angular团队选择使用XLIFF而不是JSON感到有些困惑.我想念什么?

I am a bit lost at why did the Angular team chose to use XLIFF instead of JSON. What am I missing?

由于接近投票而进行编辑

Edit due to close vote

我注意到有人说答案是基于观点的,而不是事实的. XLIFF的一个缺点是它比JSON大.我正在尝试了解除首选项外是否还有选择XLIFF的任何真正原因.

I noticed someone said the answer is opinion based and not based on facts. One downside of XLIFF is that it is bigger than a JSON. I'm trying to understand if there are any real reasons for chosing XLIFF other than preference.

推荐答案

XLIFF已被广泛使用多年,并且具有适当的

XLIFF has been widely used for years and has proper specification. It's a (de-facto) industry standard. There are lots of tools around already to enable translators with a non-technical background to work with XLIFF.

如果您想与专业翻译合作,那么每个人最好使用自己喜欢的文件格式.对于您作为程序员来说,将内容转换为所需格式的方法要比使翻译人员使用他们不知道的软件更容易.

If you want to work with professional translators, it's best for everyone to use a file format they're comfortable with. For you as a programmer it's way easier to convert stuff to a format you need, than for a translator to work with software they don't know.

我非常确定angular2中将提供某种编译/转换功能,以使您的翻译文件尽可能小.

I'm pretty sure that there will be some kind of compilation/conversion available in angular2 to make your translation files as small as possible.

此外,一旦压缩了XML(XLIFF是XML),它仅比等效的json文件大10%.

Also once XML (which XLIFF is) is gzipped it's only about 10% bigger than an equivalent json file.

这篇关于Angular2 i18n:使用XLIFF的原因是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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