ISO 3166-1 and ISO 639-2 September 25th, 2008
Thought I should share this since it so boring to parse.
ISO 3166-1
Here are the SQL queries to fill a country table with the country informations from ISO 3166-1. Getting the table structure is pretty straightforward, it contains:
- alpha-2 code
- alpha-3 code
- numeric code
- uppercase english name1
- lowercase english name
ISO 639-2
ISO 639-3 exists and extends ISO 63902 to cover “all known, living or dead, spoken or written languages”. It’s something like 7500 languages. Not super useful, so I use ISO 639-2 which already contains more than what you need.
Here are the SQL queries to fill up a language table with the 480-ish languages from ISO639-2. It contains:
- alpha-3 code
- alpha-2 code
- english name
Footnotes
Useful to have both lowercase and uppercase as some database servers (such as postgres) cock up with uppercase conversion of foreign characters. ↩