4

I renamed en.lproj to sv.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, i.e. [[NSBundle mainBundle] localizations] returns both en and sv.

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.

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.

Erik B
  • 35,941
  • 21
  • 106
  • 122

2 Answers2

6

First of all check this:

  1. List item
  2. Open project in 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

  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.

Erik B
  • 35,941
  • 21
  • 106
  • 122
Nekto
  • 17,749
  • 1
  • 51
  • 65
  • It had English and Swedish and it said that there was one file localized to English. Do you know if it's possible to see what file that is? Anyway, I clicked minus and removed that file, but the app still supports English. – Erik B Aug 26 '11 at 12:49
  • I have only MainWindow.xib. How do I check it? – Erik B Aug 26 '11 at 12:53
  • Ok! Now you should check all .xib files. Do next steps: 1. Click on .xib file in Xcode. 2. Open Utilities view (where all settings can be configured). 3. In Utilities view click on left tab icon, File inspector (it is like note icon). 4. Find Localization table and check your languages. – Nekto Aug 26 '11 at 12:54
  • It says Swedish. No English. Now what? Any ideas? – Erik B Aug 26 '11 at 12:56
  • Is property "Localization native development region" in Info.plist is set to Swedish? – Nekto Aug 26 '11 at 12:59
  • Yes, it is. Howerver, I just checked out a fresh version of the app from the repository and re-did the localization using Xcode (adding Swedish with + and removing English with -) instead of manually changing the directories and now it works. Not sure why it didn't work before, but thank you so much! – Erik B Aug 26 '11 at 13:09
3

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.

dasdom
  • 13,539
  • 2
  • 41
  • 53
  • I think your answer was pretty much the same as Nekto's, but less detailed. I removed English from that list and deleted the files, but it still supports English, any ideas? – Erik B Aug 26 '11 at 12:54
  • I fixed it. Thank you for your time. – Erik B Aug 26 '11 at 13:11