title: Localization in iPhone not working on button click
body: <p>I made an app for iPhone. In this user can change language on button click. but NSLoalizedString is not converting the value.</p>
  
  <p>the code is</p>
  
  <pre><code>-(IBAction)btn1pressed:(id)sender {
      SecViewController *sec = [[SecViewController alloc] initWithNibName:@"SecViewController" bundle:nil];
      NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
  
      // NSLog(@"%@", [userDefaults objectForKey:@"AppleLanguages"]);
  
  
      languages =@"en";
  
  
      [[NSUserDefaults standardUserDefaults] setObject:languages forKey:@"AppleLanguages"];
      [[NSUserDefaults standardUserDefaults] synchronize];     
      NSLog(@"%@", [userDefaults objectForKey:@"AppleLanguages"]);
  
      // NSLog(@"%@", NSLocalizedString(@"Subhash", nil));
      [self.navigationController pushViewController:sec animated:YES];
  }
  
  -(IBAction)btn2pressed:(id)sender {
      SecViewController *sec = [[SecViewController alloc] initWithNibName:@"SecViewController" bundle:nil];
      NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
  
      // NSLog(@"%@", [userDefaults objectForKey:@"AppleLanguages"]);
  
  
      languages = @"es";
  
  
      [[NSUserDefaults standardUserDefaults] setObject:languages forKey:@"AppleLanguages"];
      [[NSUserDefaults standardUserDefaults] synchronize];     
      NSLog(@"%@", [userDefaults objectForKey:@"AppleLanguages"]);
  
      //  NSLog(@"%@", NSLocalizedString(@"Subhash", nil));
  
      [self.navigationController pushViewController:sec animated:YES];
  }
  
  -(IBAction)btn3pressed:(id)sender {
      SecViewController *sec = [[SecViewController alloc] initWithNibName:@"SecViewController" bundle:nil];
      NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
  
      // NSLog(@"%@", [userDefaults objectForKey:@"AppleLanguages"]);
  
  
      languages =@"ja";
  
  
      [[NSUserDefaults standardUserDefaults] setObject:languages forKey:@"AppleLanguages"];
      [[NSUserDefaults standardUserDefaults] synchronize];     
      NSLog(@"%@", [userDefaults objectForKey:@"AppleLanguages"]);
  
      // NSLog(@"%@", NSLocalizedString(@"Subhash", nil));
  
      [self.navigationController pushViewController:sec animated:YES];
  }
  </code></pre>