Re: Formatting numbers, currency, and dates based on locale
Re: Formatting numbers, currency, and dates based on locale
- Subject: Re: Formatting numbers, currency, and dates based on locale
- From: Ondra Cada <email@hidden>
- Date: Sun, 5 May 2002 20:52:33 +0200
On Sunday, May 5, 2002, at 08:23 , Isaac Sherman wrote:
In OS X's System Prefs, the International panel contains the locale
settings
for numbers, dates, and time. Does Cocoa have a formatting routine for
numbers and dates that will take into account these various locale
settings?
I would like to display numbers, currency, and dates formatted in
accordance
with the machine's International settings.
I'd look at NSUserDefaults. It looks like it does exactly what you're
looking for.
Well, yes and no. Via NSUserDefaults one can get all the values and
settings; Cocoa though supports many localizable things directly. Just
search the documentation: I bet there are some services in NSCalendarDate,
also NSNumberFormatter and NSDateFormatter IIRC use the locale
information extensively.
(Caveat: I haven't checked any of them myself though: living in country
which was never explicitly supported by NeXTStep nor Mac OS X I've always
done all formatting myself, so I can't say how properly it works).
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
2K Development: email@hidden
http://www.2kdevelopment.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.