• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: From BCP-47 to Natural?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: From BCP-47 to Natural?


  • Subject: Re: From BCP-47 to Natural?
  • From: Kyle Sluder <email@hidden>
  • Date: Tue, 08 Jul 2014 22:00:46 -0500

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 (email@hidden)

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:

This email sent to email@hidden


References: 
 >From BCP-47 to Natural? (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: From BCP-47 to Natural?
  • Next by Date: Where are my speechVoices?
  • Previous by thread: From BCP-47 to Natural?
  • Next by thread: Re: From BCP-47 to Natural?
  • Index(es):
    • Date
    • Thread