Re: Localization
Re: Localization
- Subject: Re: Localization
- From: Douglas Davidson <email@hidden>
- Date: Thu, 20 Apr 2006 08:52:27 -0700
On Apr 20, 2006, at 1:25 AM, Horst Hoesel wrote:
There is a sequence of fallbacks that CFBundle/NSBundle use to
select the localization used when an application is launched. If
one of the user's preferences matches one of the application's
localizations, then the most-preferred localization will be used;
if not, then the development localization will be used; if that is
not present, then English will be used; if that is not present,
then one of the application's localizations will be used; or if
the application has no localizations, then only non-localized
resources will be used.
This is not completely correct, non-localized resources override
any and all localized resources. If non-localized resources are
present it seems the system doesn't care whether localized ones
exist. You can test this yourself: open TextEdit.app's bundle and
copy German.lproj/Preferences.nib one level up to the Resources
folder. Then launch TextEdit and choose Preferences from the
TextEdit menu. The dialog will be German regardless of your
preferred language setting and the development region.
We're talking about different things. I'm talking about how CFBundle/
NSBundle determine what localization an application is running in.
You're talking about how they obtain an individual resource. You're
right that for any individual resource, a non-localized version will
be used in preference to any localized version. That's clearly
documented; any given resource may be either localized or non-
localized, but not both.
For consistency, CFBundle/NSBundle try to determine a single most
preferred localization for an application at launch, and then attempt
to obtain all localized resources for that process (whether from the
main bundle, or from subsidiary bundles such as frameworks) from that
localization. This is intended to avoid wherever possible the
inconsistency that would result from taking resources in the same
application from more than one localization. I was discussing the
process by which CFBundle/NSBundle determines this localization.
There is a separate set of fallbacks that are used for individual
resources. First a non-localized version is looked for; then a
localized version in the application's localization; then a non-
region-specific version of that localization; then the development
localization. Slightly different rules come into play if a bundle
does not have resources for the application's localization--for
example, if you were to install and run an application in Italian on
a system that did not have Italian localizations installed for the
frameworks.
Douglas Davidson
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden