• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Country code or name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Country code or name
      • From: Chuck Soper <email@hidden>
References: 
 >Country code or name (From: Simon Stapleton <email@hidden>)

  • Prev by Date: Re: Turning OFF indexing of Java projects
  • Next by Date: Re: [Slightly OT]:Software Update app & "inactive" items
  • Previous by thread: Re: Country code or name
  • Next by thread: Re: Country code or name
  • Index(es):
    • Date
    • Thread