O'Reilly logo

Learning iOS Development: A Hands-on Guide to the Fundamentals of iOS Programming by Erica Sadun, Rod Strougo, Maurice Sharp

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Setting Up Localization for the Add/View Car Scene

The existing InfoPlist.strings string table is for localizing items from CarValet-Info.plist, such as the application name. You need a different string table to localize the interface.

The first step is to add the calls to read localized strings. You call NSLocalizedString with a key to the string table and an argument documenting the meaning of the UI element. Make the following changes in ViewController.m:

1. In displayCurrentCarInfo, change the withBaseString: argument in the call to the updateLabel:withBaseString:andCount: method:

withBaseString:NSLocalizedString(     @"Car Number",     @"Label for the index number of the current car")

2. Similarly, change the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required