i-chou's tech blog

Android iOS

iOS获取当前系统语言

| Comments

添加如下代码:

NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; 
NSArray *languages = [defaults objectForKey:@"AppleLanguages"]; 
NSString *currentLanguage = [languages objectAtIndex:0];

取得设置好的语言。。日语是ja,英文是en,其他。。就设置以后log出来看看吧!

Comments