AppleLanguages这个是语言的key,
#define CNS @"zh-Hans" //这个是中文的值
#define EN @"en" //这个是英文的值
[[NSUserDefaults standardUserDefaults] setObject:[NSArray arrayWithObjects:@"zh-Hans", nil] forKey:@"AppleLanguages"];
[[NSUserDefaults standardUserDefaults] synchronize];
NSLog(@"%@",NSLocalizedString(@"wuqiong", nil));
必须重置appDelegate,不然只能下次启动,国际话才能生效
AppDelegate * appDelegate =
(AppDelegate *)[[UIApplication sharedApplication] delegate];
appDelegate.window.rootViewController = [DDHD_ceshi new];
网友评论