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