Why can't I add localization to my iOS app?

前端 未结 4 1089
轻奢々
轻奢々 2021-02-12 10:07

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 NSLocalizedStrin

相关标签:
4条回答
  • 2021-02-12 10:50

    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.

    0 讨论(0)
  • 2021-02-12 10:55

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

    0 讨论(0)
  • 2021-02-12 11:00

    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

    0 讨论(0)
  • 2021-02-12 11:01

    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

    0 讨论(0)
提交回复
热议问题