NSLocalizedString with format

Peter Warbo picture Peter Warbo · Feb 20, 2013 · Viewed 23.9k times · Source

How would I use NSLocalizedString for this string:

[NSString stringWithFormat:@"Is “%@“ still correct for “%@“ tap “OK“ otherwise tap “Change“ to choose new contact details", individual.contactInfo, individual.name];

When using stringWithFormat before I've used it in the following manner:

[NSString stringWithFormat:@"%d %@", itemCount, NSLocalizedString(@"number of items", nil)];

Answer

Hot Licks picture Hot Licks · Feb 20, 2013
[NSString stringWithFormat:NSLocalizedString(@"Is “%@“ still correct for “%@“ tap “OK“ otherwise tap “Change“ to choose new contact details", @"Query if parm 1 is still correct for parm 2"), individual.contactInfo, individual.name];