使用Xcode 5禁用英语本地化 [英] Disable English localization with Xcode 5

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

问题描述

我已经搜索了相关问题,并尝试了许多建议的方法,但是似乎都没有用.

I have searched related questions and tried many suggested methods but none seems to work.

我有一个仅限日语的应用程序,当在英语设备上运行时,它会获得UI项目,例如后退按钮的翻译(后退").

I have a japanese-only App that when run on an english device gets UI items such as back buttons translated ("Back").

要达到这个目的,我有:

To achieve this I have:

  • 从我的项目的本地化"中删除英语,然后选择删除本地化文件(是单个* .strings文件).

  • Deleted the English from "Localizations" from my project and chose to delete localized files (was a single *.strings file).

将我的Info.plist中的CFBundleDevelopmentRegionjp_JP更改为jp,因为它应与* .lproj文件夹的名称匹配.

Changed CFBundleDevelopmentRegion in my Info.plist from jp_JPto jp as I read it should match the name of the *.lproj folder.

已清理,删除,关闭了Xcode等.但是默认的UI项仍在翻译成英文.

Cleaned, deleted, closed Xcode, etc. But default UI items are still getting translated to english.

我现在在Xcode 5中也得到了一些奇怪的行为:

Also I get some weird behavior in Xcode 5 now:

  • 选中使用基础国际化"支票簿将显示一个空的选择文件和参考语言以创建基础本地化".选择取消"或完成"无效,什么也没有发生.

  • Checking the "Use Base Internationalization" checkbook presents an empty "Choose files and reference language to create Base localization". Choosing either Cancel or Finish has no effect and nothing happens.

单击"+"按钮以添加其他">基础(基础)"本地化没有任何作用.

Clicking on the "+" button to add the Other > "Base (Base)" localization does nothing.

我觉得我的问题似乎是我的基本本地化仍然是某种程度上的英语,但是我找不到改变它的方法.有什么想法吗?

I thing that my problem seems to be that my Base localization is still somehow english but I can't find a way to change that. Any ideas?

推荐答案

我发现要真正取消英语支持,我必须将CFBundleDevelopmentRegion正确设置为完整的有效区域(例如ja_JP),而不仅仅是语言(只是ja仍然会显示英语).

I found that to truly remove English support I have to properly set the CFBundleDevelopmentRegion into a full valid region (e.g. ja_JP) and not just a language (just ja still resulted in English showing up).

当您拥有有效的区域时,Xcode将显示您的国家名称,而不是Plist编辑器中的原始值.

When you have a valid region Xcode will show you the name of your country instead of the raw value in the Plist editor.

无论如何,似乎某些模块(例如MFMailComposeViewController)都被本地化为英语(在iOS 6和7上进行了测试).

Seems like some modules, such as MFMailComposeViewController, get localized to English no matter what (tested on iOS 6 and 7).

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

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