views:

366

answers:

4

Hi All,

I was just wondering if anyone knew of a source of standard ISO data in xml format, such as ISO 3166 (Country codes/names), ISO 4217 (Currency Codes) or ISO 639 (Languages)?

If it was in any way 'official' and maintained with any changes to the standards that would be great!

Thanks,

S

UPDATE: I can't use files with non-commercial use restrictions.

UPDATE 2: Please, if you feel it necessary to vote this down, or vote it closed as a dupe, point me in the direction of the existing question with a suitable answer

+4  A: 

A good place to start is the ISO website (perhaps with the help of Google). The country codes are quite easy to find.

Neither the currency codes nor the language codes appear to be available in XML, plus the ISO charges to download them.

You can download a demlited version of ISO language codes from the Library of Congress. It would be easy enough to turn that list into XML. You could scrape this page from the ISO web site to get the currency codes.

If you are interested in other ISO codes you haven't list the ISO FAQ includes a list of commonly used ones.

So that's it for "official".

Edit

With regards to your request for sites without commercial use restrictions: if you get the Codes from some other site then that site is in breach of ISO Copyright. They do not have the right to waive the ISO's non-commercial clause. So you still cannot legally use that information in a commercial context.

APC
Yes, I've looked here. The 3166 list is pretty basic (alpha 2 codes only), and is restricted to non commercial use. And as you say, there's no xml data for the other lists. -1 for attitude.
UpTheCreek
"Attitude"? Excuse me, but I spent quite a long time putting together an answer with lots of (meant to be ) helpful links. Plus you didm't say that you had visited the ISO site and your reasons for discounting it. So -1 for ingratitude.
APC
I didn't actually mark you down. But "Did it occur to you to look at the ISO website (perhaps with the help of Google)?" is a real a-hole way to start an answer. You have added info since then and I appreciate that.
UpTheCreek
Fair point - I have toned down the opening sentence.
APC
+2  A: 

ISO does not distribute its standards, save a few exceptions. Sometimes, the data is available from another source such as the maintenance agency (SIL for ISO 639-3) but not always in a machine-readable form. Remember that the ISO dinosaur has a very different culture, millions of years away from the Internet world of Perl scripts, mash-ups and RDF.

For languages and country-codes, these standards are distributed by the IANA in the language subtag registry. A non-official XML version is available at langtag.net.

Another source is the Debian package iso-codes whose description says "This package provides the ISO 639 language code list, the ISO 4217 currency code list, the ISO 3166 territory code list, the ISO 3166-2 sub-territory list, and the ISO 15924 script code list." It apparently does not include a XML form but, since it is machine-readable, you can always do it yourself.

bortzmeyer
+1  A: 

The Debian package site which bortzmeyer links to above has a link to the FTP release distribution site. ftp://pkg-isocodes.alioth.debian.org/pub/pkg-isocodes/ The latest version 3.13 available there does include XML form. From the README:

"Furthermore, this package provides the ISO standards as XML files to be used by other applications as well. All those XML files are stored in the directory "/usr/share/xml/iso-codes"."

Hope this helps someone in the future.

stargood
+1  A: 

The CLDR - Unicode Common Locale Data Repository may be of interest.

The Unicode CLDR provides key building blocks for software to support the world's languages, with the largest and most extensive standard repository of locale data available. This data is used by a wide spectrum of companies for their software internationalization and localization, adapting software to the conventions of different languages for such common software tasks as:

  • formatting of dates, times, and time zones,
  • formatting numbers and currency values
  • sorting text
  • choosing languages or countries by name

CLDR uses the XML format provided by UTS #35: Locale Data Markup Language (LDML). LDML is a format used not only for CLDR, but also for general interchange of locale data, such as in Microsoft's .NET.

http://cldr.unicode.org/

Doug D