On Tue, Jul 8, 2014, at 09:38 PM, Gerriet M. Denkmann wrote: > There are several places where BCP-47 names (like "th-TH", "en-AU" etc.) > are used. > These are not really usable for users. > > Is there anywhere some Cocoa library or class which converts these to > natural language? > Like: > "th-TH" → "Thai" or "ไทย" > "en-AU" → "Australian English" > etc. > > I could create such a list myself (would be tedious though) - but then I > will have a problem if and when Apple implements new languages.
See the documentation for -[NSLocale displayNameForKey:value:]. There's a code example in there that does exactly what you're trying to do. --Kyle Sluder _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com