将Interface Builder中的文本标记为不需要翻译 [英] Mark text in Interface Builder as not needing translation
问题描述
我在Interface Builder中使用虚拟文本。这是一个例子。
I use dummy text in Interface Builder. Here is an example.
MYNAME
不是真正的界面文本,它是以编程方式在<$ c中设置的$ C> viewDidLoad中。我可以将这种方式标记为特殊方式,以便默认情况下将其排除在我的翻译文件之外吗?
The MYNAME
is not really interface text, and it is set programmatically in viewDidLoad
. Can I mark this a special way so that it is excluded from my translations files by default?
推荐答案
如果您使用 ibtool
设置本地化/翻译的字符串,不能直接排除单词。使用 ibtool
上的 - export-XLIFF
选项创建XLIFF文件。然后,通过添加属性 translate =no
来编辑XLIFF文件中的排除字符串。编辑后的XLIFF文件将转发给(希望)可以使用它的翻译。
If you're using ibtool
to set up the strings for localization/translation, you cannot exclude words directly. Use the --export-XLIFF
option on ibtool
to create an XLIFF file. You then edit the excluded strings in the XLIFF file by adding the attribute translate="no"
. The edited XLIFF file then goes to the translators who (hopefully) can use it.
这篇关于将Interface Builder中的文本标记为不需要翻译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!