Objective-C Localization

Skip to end of metadata
Go to start of metadata
This is a work in progress!

xib

  • TODO: Working on it...

In code strings - NSLocalizedString

  • All localizable strings in code should be externalized and referenced using NSLocalizedString.
  • Create a Localizable.strings file, run from the project root, where "Classes/*.m" is where your classes files are:
  • This will create a file in the root of your project.
  • Drag this from the Finder into your project, select "UFT-16" and "Do not copy".
  • Right click on the "Localizable.strings" and "Get Info".
  • Under the "General Tab" there should be "Localizations" with your default local language.
  • At the bottom of the window should be a "Add Localization" button, clicking this will allow you to add additional Localizations.
  • To append new keys rather then replace the whole file:
  • Reference:

http://stackoverflow.com/questions/2713494/localization-problems-in-iphone/2713585#2713585
http://rndm-snippets.blogspot.com/2010/11/best-practice-localizationinternational.html

plist files

  • Simply choose the file you want to localize, Get Info on it by selecting it and typing command i.
  • In the "General Tab", at the bottom of the window there is a "Make File Localizable" button, this will add the local default language localization and change the look of the "General Tab".
  • Clicking back on the "General Tab" will reveal the current localizations and a new button at the bottom, "Add Localization".
  • Clicking on "Add Localization" will prompt for the name of the new localization.
Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.