• 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: Localization Issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Localization Issue


  • Subject: Re: Localization Issue
  • From: Douglas Davidson <email@hidden>
  • Date: Wed, 2 Jan 2008 15:39:28 -0800


On Jan 2, 2008, at 1:46 PM, Deborah Goldsmith wrote:

There is no way to go from the newer form to the older form. You can use CFLocaleCreateCanonicalLanguageIdentifierFromString to go from the older forms to the preferred version (on 10.4 or later). If you're running on 10.3, that API is not available.

You can also use APIs on NSBundle/CFBundle to avoid having to do this canonicalization yourself. That's the best option.

Yes, this is a good illustration of why you usually don't want to use the AppleLanguages default directly. You can use CFBundleCopyPreferredLocalizationsFromArray() and CFBundleCopyLocalizationsForPreferences() to do most of what you might want to do with the contents of this default, without having to deal with canonicalization issues, and you automatically get to match the standard CFBundle behavior.


Douglas Davidson

_______________________________________________

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


  • Follow-Ups:
    • Re: Localization Issue
      • From: "parag vibhute" <email@hidden>
References: 
 >Re: Localization Issue (From: Deborah Goldsmith <email@hidden>)

  • Prev by Date: Re: Cocoa with Objective-C
  • Next by Date: Re: Cocoa with Objective-C
  • Previous by thread: Re: Localization Issue
  • Next by thread: Re: Localization Issue
  • Index(es):
    • Date
    • Thread