问题描述
如何从Xcode 6导出基本开发语言XLIFF文件,然后重新导入它以配置其他本地化。 (例如,导出 en.xliff
文件并使用它创建 fr.xliff
文件,如果要将法语添加到英语发展语言项目)
How to export a base development language XLIFF file from Xcode 6 and then re-import it to configure additional localizations. (E.g. export en.xliff
file and use it to create fr.xliff
file if you want to add French to an English development language project)
推荐答案
我发布这个作为回答你自己的问题,因为我花了好几个小时尝试为了弄清楚这一点,据我所知,Apple没有记录它。
Apple文档暗示它应该足以重命名出口基地语言XLIFF,带有可以导入的语言前缀。即如果基本本地化是英语,您应该能够创建一个文件,只需将其从 en.xliff
重命名为即可导入法文本地化fr.xliff
。
The Apple documentation implies it should be sufficient to rename an exported base language XLIFF with a language prefix to be able to import. I.e. if the base localization is English, you should be able to create a file that you can import for French localization just by renaming it from en.xliff
to fr.xliff
.
重命名文件是不够的。您还需要为每个文件
元素添加目标语言
属性。
Renaming the file is not enough. You also need to add a target-language
attribute to every file
element.
来自:
< file original =MyApp / MyApp-Info.plistsource-language =en datatype =plaintext>
对此:
< file original =MyApp / MyApp-Info.plistsource-language =endatatype =plaintexttarget-language =fr>
现在您可以将文件导入Xcode,它将创建新的本地化
Now you can import the file to Xcode and it will create the new localization
这篇关于如何让Xcode 6生成的XLIFF文件导回到Xcode中 - 重命名是不够的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!