您的位置:首页 > 移动开发 > IOS开发

获取ios设备设置的国家和语言

2012-05-31 14:08 417 查看
/**
 CCLOG("country code:%s;language code=%s",
 [RootViewController getCountryCode].UTF8String,[RootViewController getLanguageCode].UTF8String);
 
 //US en
*/
+ (NSString *)getCountryCode 
{
    return [[NSLocale currentLocale] objectForKey:NSLocaleCountryCode];
}

+ (NSString *)getLanguageCode 
{
    return [[NSLocale currentLocale] objectForKey:NSLocaleLanguageCode];
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: