What are the steps involved in localization in Xcode?

I am trying to localize my application with out storyBoard in my native language urdu (Pakistan). I watch many videos and links.

I am trying follwing steps:

  1. First Add the language
  2. then make a new String File named Localizable.string
  3. Go to View > Utilities > Show File Inspector (⌥⌘1)
  4. Locate Localization section and select "Localize..."
  5. Choose base language (I chose English), and click the required language and then click the localize.

After that go to "Editscheme" select the Application language, there is no option to select the urdu(Pakistan) language. Some one says go to project.pbxpro file and make changes to it. I tried to make changes to the file but I can't succeed.

Totally confused. What can I do?

Upvotes: 0

Views: 114

Answers (1)

Sweeper
Sweeper

Reputation: 271820

I suggest you to create the Localizable file first, then add the language. This is because you don't have a storyboard, Xcode might not know what you want to localize when you try to add the language in the project settings.

So,

  • create the Localizable.strings file first, press "Localize" and select "Base"
  • Go to project settings' Localization section:

enter image description here

  • Select the language:

enter image description here

  • Now select Localizable.strings file to localize (in the picture I have other files as well, but you should only have Localizable.strings)

enter image description here

Now you should have two Localizable.strings files, one says "Base", one says "Urdu (Pakistan)". Write your localizations in the corresponding files!

Upvotes: 2

Related Questions