//0为英文,1为中文, 2为日语,3为繁体
class func currentLanguage()->Int{
let user = UserDefaults.standard
let stringArr = user.object(forKey:"AppleLanguages")
let lang = (stringArrasAnyObject).object(at:0)as!String
if lang.contains("zh-Hans") {
return 1
}else if lang.contains("ja"){
return 2
}else if lang.contains("zh-Hant") || lang.contains("zh-HK") || lang.contains("zh-TW") {
return 3
}
return 0
}
网友评论