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,
精彩评论