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
Country codes vs. Language codes
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
][
Date Index
][
Thread Index
]
Country codes vs. Language codes
Subject
:
Country codes vs. Language codes
From: "M. Uli Kusterer" <
email@hidden
>
Date: Tue, 14 Sep 2004 16:57:23 +0200
Hi,
I'm writing an application that, while not internationalized itself, will be used to generate localized content. In particular, I have some text fields that contain language codes ("en", "de", "fr"), while I have others which contain prices and thus would better contain *country* codes.
The former I managed to work out just fine, as I can query NSGlobalDomain's AppleLanguages array to get the preferred languages.
But how can I find out what country the user is in, preferably in some ISO code? And if that country isn't available, is there some way to go from the language codes to other suitable country codes to check instead?
Take Switzerland, for example: One country code ("ch") and one currency, but four languages, including German ("de"), French ("fr") and Italian ("it"). It'd be nice to be able to find out the user is Swiss in the first place (can I query the World Map in International settings somehow?), but if there's no Swiss price, it'd be nice to have the French or German or Italian pricing instead of just defaulting to some arbitrary currency.
Any way to do that using a MacOS X API? Maybe a user defaults key like AppleLanguages? If not, any place where I can get info what language and country codes typically go together to build a table?
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
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
Follow-Ups
:
Re: Country codes vs. Language codes
From:
mmalcolm crawford <email@hidden>
Re: Country codes vs. Language codes
From:
"Sean McBride" <email@hidden>
Re: Country codes vs. Language codes
From:
Douglas Davidson <email@hidden>
Prev by Date:
Re: controlTextDidChange, backspace possible?
Next by Date:
Re: controlTextDidChange, backspace possible?
Previous by thread:
Re: controlTextDidChange, backspace possible?
Next by thread:
Re: Country codes vs. Language codes
Index(es):
Date
Thread