iOS DeveloperiOS 开发

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];

原文链接:http://keepmovingxin.com/archives/32

上一篇下一篇

猜你喜欢

热点阅读