Localizable.strings(base)x English [英] Localizable.strings (base) x English

查看:166
本文介绍了Localizable.strings(base)x English的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在在Xcode 5上对文件进行本地化时,您将拥有这个基本文件,如果用户使用的是未本地化的其他语言,我将理解这个文件。在旧版本的Xcode上,你没有。

When you localize a file on Xcode 5 now, you have this "base" file, that I understand will be used if the user is using another language that was not localized. On older versions of Xcode, you did not have that.

我想让英语成为基本语言,默认使用。所以我想,用这个基地种类,我不需要有一个英语本地化(如果我想要英语是违约),对不对?

I want english to be the base language, that will be used by default. So I guess that with this "base" kind, I did not need to have an "english" localization (if I want english to be de default), right? I simply put all english localization inside the "base".

这是正确的吗?

推荐答案

听起来不错。

我一直有很大的麻烦,如果我让Xcode为我生成新的语言文件,所以我开始在我的拥有此小脚本

I have always had big troubles if I let Xcode generate new language files for me so I started to create them on my own with this little script.


  • 在Xcode中只需在项目设置中添加语言(在本地化下),确保激活使用基本国际化。

  • 运行脚本。

  • 只要在项目中将其从您的finder中拖放出来(取消选择复制选项)
  • In Xcode just add the languages in the project settings (under Localizations) an make sure "Use Base Internationalization" is activated
  • Run the script. This now creates all the needed translation files in you tree
  • Just drag and drop them from you finder in your project (deselect the copy option)

很好的思考脚本是,如果你有代码中的任何更新脚本照顾这一点,并更新您的翻译文件。

The great think about the script is, if you have any updates in your code the script takes care of this and updates your translation files. Apple's own genstrings always overwrites everything.

编辑:
我写了一个 blog post 关于使用iLocalize翻译,可能很有趣。

I wrote a blog post about translating with iLocalize, might be interesting.

这篇关于Localizable.strings(base)x English的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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