Search code examples
objective-cxcodelocalizationplistxib

Localizing my iphone app, not using the localized files correctly


I am trying to localize my app. I have added locale "sv" (Swedish). I have localized both my xib file and a plist with some information I need.

When setting the simulator to English, it is using the English xib. Also, when setting the simulator to Swedish (both language and region) it still use the default English xib.

For the plist it is the opposite around. It always uses the sv-version no matter if I use English or Swedish settings.

I always change both the language and region.

I assume that I don't have to do anything special in the code, the app should just pick the correct file based on the settings on the phone, right?

I don't know how to debug from here, or fix the problem. Please advice.

Thanks!


Solution

  • Clean All Targets... I wanted to do this but it was always disabled. But since I'm such a newbie I didn't think about that you can only clean target when the app is not running in the simulator. But cleaning the targets made it work.

    Resetting the content of the app was not sufficient but I do need to both cleant targets and reset simulator in order to get it to work.

    I would be most happy to have it comfirmed that this is something that's supposed to be needed or if there's something with my application/xCode that isn't working corretly.