I have iPhone application using storyboard with two language (Arabic / English) how i can switch from Arabic localization storyboard to English storyboard without need to change
I have resolved you can do it as the following below code :
UIStoryboard *storyBoard;
if ([language isEqualToString:@"ar"]) {
lan = [[NSLocale preferredLanguages] objectAtIndex:0];
storyBoard = [UIStoryboard storyboardWithName:@"MainStoryboard_iPhone5Arabic" bundle:bnd];
}
else if([language isEqualToString:@"en"]) {
NSLog(@"DDD ");
lan = [[NSLocale preferredLanguages] objectAtIndex:20];
storyBoard = [UIStoryboard storyboardWithName:@"MainStoryboard_iPhone5English" bundle:bnd];
}
NSBundle *bnd = [NSBundle bundleWithPath:[[NSBundle mainBundle]pathForResource:lan ofType:@"lproj" ]];
UIViewController *initViewController = [storyBoard instantiateInitialViewController];
[self.window setRootViewController:initViewController];