-(void)alertinterface:(NSString *)title1 buttonwithtitle:(NSString *)title2 messagetext:(NSString *)messagetext informativetext:(NSString *)informative
{
NSAlert *alertForNotSelectIcon = [[NSAlert alloc] init];
[alertForNotSelectIcon addButtonWithTitle:title1];
[alertForNotSelectIcon addButtonWithTitle:title2];
[alertForNotSelectIcon setMessageText:messagetext];
[alertForNotSelectIcon setInformativeText:informative];
[alertForNotSelectIcon setAlertStyle:NSWarningAlertStyle];
[alertForNotSelectIcon beginSheetModalForWindow:self.window modalDelegate:self didEndSelector:nil contextInfo:nil];
}
//调用
NSString *title1 =NSLocalizedString(@"title1", nil);
NSString *title2 =NSLocalizedString(@"title2", nil);
NSString *messagetext =NSLocalizedString(@"messagetext0", nil);
NSString *informativetext =NSLocalizedString(@"informativetext1", nil);
[self alertinterface:title1 buttonwithtitle:title2 messagetext:messagetext informativetext:informativetext];
/
//Localizable.strings文件//
。。。。。。