Closed Janak-Nirmal closed 10 years ago
- (void)switchLanguage { if([[[LanguagesManager sharedInstance] getDefaultLanguage] isEqualToString:@"fr"]) { [[LanguagesManager sharedInstance] setLanguage:@"en"]; } else { [[LanguagesManager sharedInstance] setLanguage:@"fr"]; } UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:[[JMOViewController alloc] initWithNibName:nil bundle:nil]]; navController.navigationBarHidden = YES; self.window.rootViewController = navController; [UIView transitionWithView:self.window duration:0.5 options:UIViewAnimationOptionTransitionFlipFromLeft animations:^{ } completion:nil]; }
In above code for if condition it always goes to else part i.e.
[[LanguagesManager sharedInstance] getDefaultLanguage] always returns en though current language may be different from it.
[[LanguagesManager sharedInstance] getDefaultLanguage]
en
Correction done ! Thanks
In above code for if condition it always goes to else part i.e.
[[LanguagesManager sharedInstance] getDefaultLanguage]
always returnsen
though current language may be different from it.