Skip to content

Instantly share code, notes, and snippets.

@interchen
Created July 17, 2014 06:00
Show Gist options
  • Save interchen/480a2a4ddde2fdcf9212 to your computer and use it in GitHub Desktop.
Save interchen/480a2a4ddde2fdcf9212 to your computer and use it in GitHub Desktop.
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];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment