Re: Localization + NSGlobalDomain + AppleMeasurementUnits?
Re: Localization + NSGlobalDomain + AppleMeasurementUnits?
- Subject: Re: Localization + NSGlobalDomain + AppleMeasurementUnits?
- From: Darkshadow <email@hidden>
- Date: Sun, 2 Jan 2005 14:47:26 -0500
The default, if it isn't in the global domain, is "Inches". There's a
registration domain, that you can obtain via NSUserDefaults (it's a
volatile domain, named NSRegistrationDomain) that'll give you the
values that are used if they aren't specified in anything else.
Note, you don't have to call the registration domain to get these
values; I was just mentioning the registration domain in case you were
curious and wanted to check it out. You can call NSUserDefaults as
normal and these values will be returned if they aren't set anywhere
else. It's the same as registering defaults in your app.
I have no idea if the names are localized or not, though. Never tested
that one. I would guess no, as it would be up to the application and
not NSUserDefaults to localize stuff...
Darkshadow (aka Michael Nickerson)
On Jan 2, 2005, at 12:57 PM, Mark Dawson wrote:
A few questions about NSGlobalDomain, localization,
AppleMeasurementUnits
(1) When I first (from terminal) did a "defaults read NSGlobalDomain",
the "AppleMeasurementUnits" variable wasn't there. Only when I set my
unit to Metric did the variable appear.
My question: if I did the "[[NSUserDefaults standardUserDefaults]
objectForKey:@"AppleMeasurementUnits"]" when it wasn't set yet, what
would be my return value (would I still get "Inches"?).
(1b) I'm not sure how to clear that variable to test it…
(2) The two values that I saw were "Inches" and "Centimeters".
(a) Is there any way to tell what the possible values could be? I
couldn't locate any documentation or .h file that listed them.
(b) Are these terms localized (i.e., "Inches" changes to "xxxx" in
Chinese?)
(c) (a+b) The overriding question: How do I determine what the
measurement units are/is there a way that doesn't have be localized to
tell what the measurement units are?
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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