Re: Country code or name
Re: Country code or name
- Subject: Re: Country code or name
- From: mmalcolm crawford <email@hidden>
- Date: Sun, 14 Sep 2003 19:40:42 -0700
On Sep 12, 2003, at 8:44 AM, Simon Stapleton wrote:
Well, I've been loking all over the place, but I can't seem to find
it. I need to be able to at least guess the current user's country
(not timezone, that's not specific enough, or language, that doesn't
work either). I'd like to avoid having to code this all up myself,
but can do if needs be.
It's not entirely clear what your goal is here. Do you need to know
where they are geographically, or are you interested in their
"preference". If the latter, then you may be able to make a good guess
from System Preferences. The first language returned from the
AppleLanguages setting may give enough information (if you just get
"en" back it's a reasonable guess that it'll mean "USA"...). For more
on interpreting the codes, see:
<
http://www.stepwise.com/Articles/Technical/2003-04-03.01.html>
Note also the various LocaleRef functions in Carbon (e.g.
<
http://developer.apple.com/documentation/Carbon/Reference/
Locale_Utilities/locale_refchap/function_group_3.html>).
mmalc
_______________________________________________
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.