如何通过ibtool转换字符串使UILabel内容不可本地化? [英] How to make UILabel contents non localizible when genetating string via ibtool?
问题描述
我的xib上有一些标签。其中一些不需要本地化。当我通过ibtool生成字符串文件时,所有标签内容都包含在结果文件中。
如何在生成字符串时从本地化中排除IB中的某些UI对象?
I have some labels on my xib. Some of them are not need to be localized. When i generate strings file via ibtool all labels content included in result file. How can i exclude some UI objects in IB from localization when generate strings?
推荐答案
不幸的是没有办法注释你的nib / xib文件的内容,以便ibtool的 - export-strings-file
命令忽略某些字符串。
Unfortunately there is no way to annotate the content of your nib/xib files so that ibtool's --export-strings-file
command ignores certain strings.
您可以选择使用 - export-xliff
选项,然后编辑XLIFF文件以锁定不得翻译的段(属性 translate =no
)然后将它们发送到您所有语言的本地化。如果本地化程序使用兼容XLIFF的CAT工具,那么这可能是值得做的。
You could instead opt to use the --export-xliff
option and then edit the XLIFF file to lock segments that must not be translated (attribute translate="no"
) before sending them out to be localized in all your languages. That's probably only worth doing if the localizers use a XLIFF-compatible CAT tool though.
这篇关于如何通过ibtool转换字符串使UILabel内容不可本地化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!