iOS localization with iLocalize

I did it once and now I needed to do it again – and of course I forgot how to do it, so this time I’ll write it down how localisation of an iOS project works.

I don’t use nib files and all user facing strings are set in code with NSLocalizedStrings(…). If you are using nibs or need to translate strings in Storyboard and/or nib files approach might differ.

English is considered as the base language and Swedish as the translation.

1) This is the workflow if you added new NSLocalizedString(…) in your code:

  1. Have your project with NSLocalizedString
  2. run `genstrings -o en.lproj **/*.m` in the correct folder (zsh needed)
  3. start iLocalize
  4. “Project” -> “Update from files…” -> add the en.lproj/Localizable.strings -> “Update the project from a new version of these files”
  5. click “Update”
  6. translate


2) This is the workflow if you updated the sv.lproj/Localizable.strings files e.g. manually added them in vim or you had someone translate it for you

It might be always good idea to update your Base language first so you can directly see after important the Swedish Localizable.strings file which “Translation Keys” have changed and need updating or if the translator got everything.

  1. In iLocalize on the top left you choose (for this example) Swedish
  2. “Project” -> “Update from files…” -> select your sv.lproj/Localizable.strings file-> “Update a localised language from these files”
  3. Make sure in the box Swedish is selected
  4. Click “Update”
  5. translate
This entry was posted in computer and tagged , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *