Xcode本地化不起作用? [英] Xcode Localization Not Working?

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

问题描述

我正在尝试为Mac OS X(Mountain Lion)的应用添加新的本地化版本. 我将适当的本地化添加到项目信息面板,并使所有.xib文件都本地化.我还添加并翻译了.strings文件,并将.xib文件替换为翻译后的字符串文件. 然后一切似乎都正常了,并且界面生成器为每个本地化xib文件显示了适当的翻译.但是,当我实际运行该应用程序时,它以英语显示,尽管我的系统的默认语言不是英语. 对于某些标签,我也有一个Localizable.strings文件,对于我使用的NSLocalizedString来说,它们工作正常. 我不确定我在这里想念什么吗?

I am trying to add a new localization for my app for Mac OS X (Mountain Lion). I added the appropriate localizations to the project info panel and made all the .xib files localized. I also added and translated the .strings file and replaced the .xib files with the translated strings file. Then everything seemed to be working, and the interface builder showed appropriate translations for each localization xib file. However, when I actually run the app, it is shown in English, although the default language for my system is not English. I also have a Localizable.strings file for some of the labels, and for those that I used NSLocalizedString works fine. I'm not sure what I am missing here?

先谢谢了.

推荐答案

  1. 执行构建清理(Command-Option-Shift-K)
  2. 从模拟器/设备中删除应用
  3. 启动应用

这篇关于Xcode本地化不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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