简体   繁体   中英

NSlocalized string does not appear on uialert view

I am making an app in which i want to show uialert view. i am giving NSLocalized string to this uialertview.But my Nslocalized string does not appear on uialertview only empty alert view appear. i am unable to understaand what is the problem below is my code:

if(!self.transporterCompanyName_.text || [self.transporterCompanyName_.text isEqualToString:@""] || !self.transporterLastName_.text || [self.transporterLastName_.text isEqualToString:@""] || !self.transporterFirstName_.text || [self.transporterFirstName_.text isEqualToString:@""] || !self.transporterEmail_.text || [self.transporterEmail_.text isEqualToString:@""] || !self.transporterTelNo_.text || [self.transporterTelNo_.text isEqualToString:@""] || !self.transporterUserName_.text || [self.transporterUserName_.text isEqualToString:@""] || !self.transporterPassword_.text || [self.transporterPassword_.text isEqualToString:@""] || !self.transporterConfirmPassword_.text || [self.transporterConfirmPassword_.text isEqualToString:@""]){

        [FBMessageHandler displayAlertMessageWithOkButton:NSLocalizedString(@"All text fields are mandatory. Please fill the complete form and then submit!", @"incomplete reg form") backgroundImage:nil tag:0 andDelegate:self addInQueue:NO andParentViewController:self];

        return;
    } 

here is my FbMessageHandler

+ (void)displayAlertMessageWithOkButton:(NSString *)message backgroundImage:(NSString*)bImage
                                  tag:(int)tagValue
                            andDelegate:(id)delegate addInQueue:(BOOL)queue andParentViewController:(UIViewController *)viewController
{
    FBAlertViewController *alert = [[FBAlertViewController alloc] initWithNibName:@"FBAlertWithOkOption" andMessage:message backgroundImage:bImage tag:tagValue andDelegate:delegate addInQueue:queue buttonText:nil];
    [viewController addChildViewController:alert];
    [viewController.view addSubview:alert.view];
    [alert didMoveToParentViewController:viewController];
    alert = nil;
}

Thanx in advance

just try this

 [FBMessageHandler displayAlertMessageWithOkButton:NSLocalizedString(@"All text fields are mandatory. Please fill the complete form and then submit!", @"incomplete reg form") backgroundImage:nil tag:0 andDelegate:self addInQueue:NO andParentViewController:self];

into

    [FBMessageHandler displayAlertMessageWithOkButton:NSLocalizedString(@"All text fields are mandatory. Please fill the complete form and then submit!, incomplete reg form") backgroundImage:nil tag:0 andDelegate:self addInQueue:NO andParentViewController:self];

choice no 2

    NSString *msgstr=[NSString stringWithFormat:@"All text fields are mandatory. Please fill the complete form and then submit!,incomplete reg form"];


   [FBMessageHandler displayAlertMessageWithOkButton:msgstr backgroundImage:nil tag:0 andDelegate:self addInQueue:NO andParentViewController:self];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM