Disable English localization with Xcode 5

痞子三分冷 提交于 2019-12-05 14:36:01

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).

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


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

I encountered the same issue. Here are the steps I did to get past them.

  1. Localize your storyboard file.
    1. Select your Storyboard file in Xcode.
    2. In the “File Inspector”, under the “Localization” sub header, press the “Localize…” button.
    3. A dialog appears that says “Do you want to localize this file? The file will be moved into the lproj folder for the following language.” It lists a language. For me it was “English” and I chose that. For you, I suspect it will be “Japanese”.
    4. Press the “Localize” button.
  2. If it warns you that your storyboard file has changed outside of the project, choose “Save anyway”. If you don't it deletes the storyboard from your project. This happened to me with a source controlled project, but not with a new empty project.
  3. Go back to your project and check the “Use Base Internationalization” checkbox. Your storyboard should show up in the "Choose files and reference language to create Base localization" sheet.

If you go back to your storyboard, you will see “Base” as the checked localization. I had my language (English) show up as an option. When I checked it, a storyboard.strings file was created. Since my base was already in my preferred language, I didn’t need a strings file so I removed it. I presume that if I had another language, I could select that and get a storyboard.strings file for that language.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!