NSLocalizedString vs localizedStringForKey:value:table

Viewed 19

What is the real difference here?

NSLocalizedString (kStringUntitled, nil);

[[NSBundle mainBundle] localizedStringForKey: kStringUntitled value:nil table:nil]

Apple says that NSLocalizedString returns "The result of sending localizedStringForKey:value:table: to the main bundle, passing the specified key."

This seems to make them identical, but Apple goes on to say, "Use this macro to automatically generate the default Localizable.strings file from your code when exporting localizations from Xcode or the genstrings utility"

I have manually generated my Localized.strings file so that it has an entry like this:

Untitled = "Untitled";

and then in a header file somewhere I use:

kStringUntitled @"Untitled"
0 Answers
Related