NSLocalizedString only returning key [solved]


Odd. When I used:

NSAlert *alert = [NSAlert 
alertWithMessageText:NSLocalizedString(@"REMOVE_MSG", @"Remove") 
defaultButton:NSLocalizedString(@"REMOVE", @"Remove") 
alternateButton:NSLocalizedString(@"CANCEL", @"Cancel") 
informativeTextWithFormat:NSLocalizedString(@"REMOVE_INF", @"%d people will be removed"), 
 [selectedPeople count]] ;

After running the app, I only ever got back the KEY from the strings tables… I did a little research and found this to fix it:

    NSAlert *alert = [NSAlert
                      alertWithMessageText:NSLocalizedStringFromTable(@"REMOVE_MSG", @"localizable", @"Remove")
                      defaultButton:NSLocalizedStringFromTable(@"REMOVE", @"localizable", @"Remove")
                      alternateButton:NSLocalizedStringFromTable(@"CANCEL", @"localizable", @"Cancel")
                      informativeTextWithFormat:NSLocalizedStringFromTable(@"REMOVE_INF", @"localizable", @"%d people will be removed"),
                      [selectedPeople count]] ;


NSLocalizedStringFromTable(@“key”, @“stringTableFileName”, @“Comment”);

i.e. the localizable files were called Localizable.string, you leave the string off and just use the work Localizable. Worked perfectly after I made this change…

FYI, I’m using XCode - Version 4.6 (4H127)

Did anyone else notice this behavior?