xcode不会本地化特定的字符串 [英] xcode don't localize specific strings

查看:91
本文介绍了xcode不会本地化特定的字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的情节提要文件中,我有多个不需要本地化的字符串,它们的文本在运行时填充了来自服务器或代码的值(作者的姓名,对象名称等);初始文本中填充以下内容:标签",作者姓名". (我想将这些原始值保留在故事板中,以供预览之用.)

In my storyboard files, I have multiple strings, which I don't need to localize, their text filled with values from server or code at run-time (author's name, object name, etc.); with initial text filled with something like: 'Label', 'Author Name'. (I want to keep these original values in storyboards, for previewing interface.)

我正在对.xliff文件使用本地化.

I am using localization with .xliff files.

我可以以某种方式标记它们,以便它们最终不会出现在相应的.xliff文件中进行本地化吗?

Can I somehow mark them, so they won't end up in corresponding .xliff files for localization?

推荐答案

我建议使用"$ Label $"和"$ Author Name $"之类的文本,因此首先在您的显示中很明显您有一个字符串在其他地方需要替换的地方,这对翻译者来说显然是不应该翻译的.只要他们能接受简单的说明,例如不要翻译以美元符号开头和结尾的字符串".

I'd recommend using text like "$Label$" and "$Author Name$", so first it is obvious in your display that you have a string where something else would need to be substituted, and it makes it obvious to a translator that it shouldn't be translated. As long as they can take simple instructions like "don't translate strings that start and end with a dollar sign".

这特别有用,因为作者姓名"之类的内容可能会出现在您的UI中您真正希望翻译的地方.

That's especially useful since something like "Author Name" might appear somewhere else in your UI where you really want it to be translated.

这篇关于xcode不会本地化特定的字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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