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 ...
Get Learning iOS Development: A Hands-on Guide to the Fundamentals of iOS Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.