if ([objGlobalUser.strAppLangID isEqualToString:[@"en" uppercaseString]]) {
objGlobalUser.strLanguage =@"en";
[[NSUserDefaults standardUserDefaults] setObject:[NSArray arrayWithObjects:objGlobalUser.strLanguage, nil] forKey:@"AppleLanguages"];
[[NSUserDefaults standardUserDefaults] synchronize];
NSLog(@"preferredLang: %@", objGlobalUser.strLanguage);
} else {
objGlobalUser.strLanguage =@"ar";
[[NSUserDefaults standardUserDefaults] setObject:[NSArray arrayWithObjects:objGlobalUser.strLanguage, nil] forKey:@"AppleLanguages"];
[[NSUserDefaults standardUserDefaults] synchronize];
}
NSString *path= [[ NSBundle mainBundle ] pathForResource:objGlobalUser.strLanguage ofType:@"lproj" ];
self.viewController = [[MyViewController alloc] initWithNibName:@"MyViewController"
bundle:[NSBundle bundleWithPath:path]];
语言更改时仅显示字符串而不显示图像