If you ever needed a mysql table with all the languages detailed in the ISO-639 language codes, here it is. I took the list from the registration authority and created the table in Mysql.
There are 21 languages that have alternative codes for bibliographic or terminology purposes. In those cases I took the bibliographic ones. The script contains the 2 and 3 letter ISO-639 language codes, as well as the English and French names of the languages.
This is a preview:
CREATE TABLE `i18n_language_codes` (
`3letter` char(3) NOT NULL COMMENT 'ISO 639-2 Code',
`2letter` varchar(2) default NULL COMMENT 'ISO 639-1 Code',
`english_name` varchar(255) default NULL,
`french_name` varchar(255) default NULL,
PRIMARY KEY (`3letter`),
KEY `2letter` (`2letter`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO i18n_language_codes (3letter,2letter,english_name,french_name) VALUES
('aar','aa','Afar','afar'),
...
Download Mysql languages dump (structure and data):
download the ISO-639 MySQL script from GitHub
Comments All ISO-639 language codes for MySQL
Sadly the download link for the MySQL script is broken (looks like the subdomain doesn't exist anymore). Any chance you can restore it soon? Thanks!
Sorry Chris,
It seems I had a problem with the DNS server resolving docs.harecoded.com. I fixed it but it might take a while to propagate. If you are in a rush drop me a line and I'll download the file from the server and send it back to you over email.
UPDATE: Now the file (and several others) are hosted on GitHub. See the link in the post.