NSUserDefaults
*defaults = [
NSUserDefaults
standardUserDefaults ];
// 取得 iPhone 支持的所有语言设置
NSArray
*languages = [defaults objectForKey : @
"AppleLanguages"
];
NSLog
( @
"%@"
, languages);
|
运行,打印结果:
(
en,//英国
fr, //法国
de, //德国
"zh-Hans",//简中
"zh-Hant",//繁中
ja, //japan
nl, //dutch
it, //italy
es, //spanish
"es-MX", //spanish mexico
ko, //korea
pt, //portuguese
"pt-PT",
da,
fi,
nb,
sv,
ru, //russian
pl,
tr,
uk,
ar, //arabic
hr,
cs,
el, //greek
he,
ro,
sk,
th, //thai
id,
ms,
"en-GB",
"en-AU",
ca,
hu,
vi,
hi
)
(
en,
"zh-Hant",
"zh-Hans",
fr,
de,
ja,
nl,
it,
es,
pt,
"pt-PT",
da,
fi,
nb,
sv,
ko,
ru,
pl,
tr,
uk,
ar,
hr,
cs,
el,
he,
ro,
sk,
th,
id,
"en-GB",
ca,
hu,
vi
)
"zh-Hant" 繁体中文
"zh-Hans", 简体中文