Re: Localization Issue
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