iOS 如何获取当前设置的语言
2016-03-25 本文已影响2115人
keep_moving
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSArray *languages = [defaults objectForKey:@"AppleLanguages"];
NSString *currentLanguage = [languages objectAtIndex:0];
取得设置好的语言。日语是ja,中文是zh_Hans ,英文是en ...
NSArray *Localizations = [[NSBundle mainBundle] preferredLocalizations];