22
votes

I'm trying to add a localization. I've read all those localization/internationalization guides from Apple and raywenderlich.com. I've marked all my code with NSLocalizedString macro, I've used genstrings to create Localizable.strings. But somehow I'm missing some important step.

When I try to add localization to my Localizable.strings I'm somehow restricted to English only.

When I try to add localization to project via "Editor"->"Add Localization" all language options are disabled.

Does anybody have any thoughts as to why am I restricted to English only? What have I missed?

I've tried to add localization to other projects with the same result. :(

4
Have you remembered to change your device's language preferences to test?CrimsonDiego
@CrimsonDiego I think the problem is in Xcode. He didn't get to deploying yet.Constantino Tsarouhas

4 Answers

50
votes

You need to first add your localizations to your project. Click on the project file, ensure that the project, not the target, is selected in the middle pane and then choose the "Info" screen. There's a area called "Localizations" where you can add languages. You should then be able to localize your resources.

Important pieces

7
votes

Another possible issue is that you are not selecting appropriately the project, which leads to all languages in the Add localization list being disabled.

By default the target may be selected, make sure you select the project instead. Then you can use the Add localization normally.

enter image description here

enter image description here

1
votes

Something which kept me busy for too long. I looked over the language I needed (Swedish) in the first list and took the one from the "Other" list. Well my phone or emulator didn't change at all to Swedish. But when I took Swedish from the first list it got nicely updated when changing the language settings.

enter image description here

-1
votes

With Xcode 6, you can do it via Project Settings.