标签:tin bool ase apple ons cas nsa for current
/** 获取当前是否是汉语 */
+ (BOOL )getZnLaunage
{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSArray *languages = [defaults objectForKey:@"AppleLanguages"];
NSString *currentLang = [languages objectAtIndex:0];
if([currentLang compare:@"zh-Hans-CN" options:NSCaseInsensitiveSearch] == NSOrderedSame
|| [currentLang compare:@"zh-Hant-CN" options:NSCaseInsensitiveSearch] == NSOrderedSame
|| [currentLang compare:@"zh-Hant-TW" options:NSCaseInsensitiveSearch] == NSOrderedSame
|| [currentLang compare:@"zh-Hant-HK" options:NSCaseInsensitiveSearch] == NSOrderedSame
|| [currentLang compare:@"zh-Hant-MO" options:NSCaseInsensitiveSearch] == NSOrderedSame)
{
return YES;
}
else
{
return NO;
}
}
// zh-Hant-TW 繁体中文台湾
// zh-Hant-HK 繁体中文香港
// zh-Hant-MO 繁体中文澳门
// en-CN 英文
标签:tin bool ase apple ons cas nsa for current
原文地址:https://www.cnblogs.com/shaoquanzhijia/p/10156600.html