On 9 Jul 2014, at 19:27, Kyle Sluder <[email protected]> wrote: > > 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.
Thanks! This is exactly what I was looking for. And, now that I know it, NSLocale is kind of the obvious place to look for this functionality. Kind regards, Gerriet. _______________________________________________ Cocoa-dev mailing list ([email protected]) 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 [email protected]
