简体   繁体   English

如何在iOS应用中删除对英语的支持?

[英]How do I remove support for English in my iOS app?

I renamed en.lproj to sv.lproj . 我将en.lprojen.lprojsv.lproj I then added the Swedish resources to the project and removed the English resources. 然后我将瑞典资源添加到项目中并删除了英语资源。

The problem is that the app still "thinks" that it supports English, ie [[NSBundle mainBundle] localizations] returns both en and sv . 问题是app仍然“认为”它支持英语,即[[NSBundle mainBundle] localizations]返回ensv

I've removed every reference to en and English that I could find in the project file and the info plist, but it still supports English. 我删除了我在项目文件和信息plist中找到的enEnglish所有引用,但它仍然支持英语。

I'm running out of ideas, so please help me. 我的想法已经不多了,所以请帮助我。 There must be a ton of people that written apps that doesn't support English. 必须有很多人编写不支持英语的应用程序。 Still I haven't been able to find anything useful on Google. 我仍然无法在Google上找到任何有用的内容。

First of all check this: 首先检查一下:

  1. List item 项目清单
  2. Open project in Xcode >= 4.0.2 在Xcode> = 4.0.2中打开项目
  3. Click on project file 单击项目文件
  4. Select item under Project title on the right 选择右侧项目标题下的项目
  5. Check Localizations table. 检查本地化表。

EDIT: Adding the final steps to solve my problem in case anyone has the same problem. 编辑:添加最后的步骤来解决我的问题,以防任何人有同样的问题。 /Erik B / Erik B.

  1. Select the localization you want to duplicate (English) 选择要复制的本地化(英语)
  2. Click + and select the language you want you're app to use (Swedish) 单击+并选择您希望应用程序使用的语言(瑞典语)
  3. Select the localization you want to remove (English) 选择要删除的本地化(英语)
  4. Click - and delete the files 单击-并删除文件

That's all there's to it. 这就是它的全部内容。 Now your app will only use Swedish or whatever language you chose. 现在,您的应用只会使用瑞典语或您选择的任何语言。

First go to project details (first entry in the project navigator) and click on your project to see the global settings. 首先转到项目详细信息(项目导航器中的第一个条目),然后单击您的项目以查看全局设置。 Look what is written under "Localizations". 看看“本地化”下的内容。 If there is still "English" you have to check for every file what is in the file inspector under Localization. 如果仍有“英语”,则必须检查“本地化”下文件检查器中的每个文件。 Remove every English localization. 删除所有英语本地化。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM