开发者

NSLocale - get all available languages

is there a way to get all available languages开发者_JAVA百科 on the iphone just like in the settings app?

can't find a method in NSLocales Class Reference.

thanks!

alt text http://dl.getdropbox.com/u/80699/Bildschirmfoto%202010-07-26%20um%2019.45.49.png


Well, there is [NSLocale availableLocaleIdentifiers]

EDIT: what do you mean by “I need the local identifiers”? Do you mean the NSLocale identifiers or the localized language names? I fear the latter is not possible.


NSLocale displayNameForKey:value: is your friend. :)


[NSLocale preferredLanguages] will get you a list of codes like this, which you can translate yourself:

en,
fr,
de,
ja,
nl,
it,
es,
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜