Saturday, December 1, 2012

MySQL Language names, native names and ISO 639-1 codes

Hello,

Recently I needed to make a language selection table. Didn't find it as an MySQL restore file so made one myself.

If you find yourself in need of most spoken languages with their native names and two-letter codes. Here it is:

DROP TABLE IF EXISTS `languages`;
CREATE TABLE `languagesx` (
  `ID` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `Name` varchar(145) NOT NULL,
  `NativeName` varchar(145) NOT NULL,
  `ISO639_1` varchar(45) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
 


Insert Into Languages (Name,NativeName,ISO639_1) VALUES ('Abkhazian','Аҧсуа','ab'),
('Afar','Afaraf','aa'),
('Afrikaans','Afrikaans','af'),
('Akan','Akan','ak'),
('Albanian','Shqip','sq'),
('Amharic','አማርኛ','am'),
('Arabic','العربية','ar'),
('Aragonese','Aragonés','an'),
('Assamese','অসমীয়া','as'),
('Armenian','Հայերեն','hy'),
('Avaric','авар мацӀ','av'),
('Avestan','avesta','ae'),
('Aymara','aymar aru','ay'),
('Azerbaijani','azərbaycan dili','az'),
('Bashkir','башҡорт теле','ba'),
('Bambara','bamanankan','bm'),
('Basque','euskara','eu'),
('Belarusian','Беларуская','be'),
('Bengali','বাংলা','bn'),
('Bihari','भोजपुरी','bh'),
('Bislama','Bislama','bi'),
('Bosnian','bosanski jezik','bs'),
('Breton','brezhoneg','br'),
('Bulgarian','български език','bg'),
('Burmese','ဗမာစာ','my'),
('Catalan; Valencian','Català','ca'),
('Chamorro','Chamoru','ch'),
('Chechen','нохчийн мотт','ce'),
('Chichewa','chinyanja','ny'),
('Chinese','"中文 (Zhōngwén), 汉语, 漢語"','zh'),
('Chuvash','чӑваш чӗлхи','cv'),
('Cornish','Kernewek','kw'),
('Corsican','corsu','co'),
('Cree','ᓀᐦᐃᔭᐍᐏᐣ','cr'),
('Croatian','hrvatski','hr'),
('Czech','česky','cs'),
('Danish','dansk','da'),
('Maldivian','ދިވެހި','dv'),
('Dzongkha','རྫོང་ཁ','dz'),
('English','English','en'),
('Esperanto','Esperanto','eo'),
('Estonian','eesti','et'),
('Ewe','Eʋegbe','ee'),
('Faroese','føroyskt','fo'),
('Fijian','vosa Vakaviti','fj'),
('Finnish','suomi','fi'),
('French','français','fr'),
('Fula','Pular','ff'),
('Galician','Galego','gl'),
('German','Deutsch','de'),
('Greek','Ελληνικά','el'),
('Guaraní','Avañe''ẽ','gn'),
('Gujarati','ગુજરાતી','gu'),
('Haitian','Kreyòl ayisyen','ht'),
('Hausa','"Hausa, هَوُسَ"','ha'),
('Hebrew','עברית','he'),
('Herero','Otjiherero','hz'),
('Hindi','हिन्दी, हिंदी"','hi'),
('Hiri Motu','Hiri Motu','ho'),
('Hungarian','Magyar','hu'),
('Indonesian','Bahasa Indonesia','id'),
('Irish','Gaeilge','ga'),
('Igbo','Igbo','ig'),
('Inupiaq','Iñupiaq','ik'),
('Ido','Ido','io'),
('Icelandic','Íslenska','is'),
('Italian','Italiano','it'),
('Inuktitut','ᐃᓄᒃᑎᑐᑦ','iu'),
('Japanese','日本語','ja'),
('Javanese','basa Jawa','jv'),
('Georgian','ქართული','ka'),
('Kongo','KiKongo','kg'),
('Kazakh','Қазақ тілі','kk'),
('Central Khmer','ភាសាខ្មែរ','km'),
('Kannada','ಕನ್ನಡ','kn'),
('Korean','韓國語','ko'),
('Kanuri','Kanuri','kr'),
('Kashmiri','"कश्मीरी, كشميري‎"','ks'),
('Kurdish','Kurdî','ku'),
('Komi','коми кыв','kv'),
('Kirghiz','кыргыз тили','ky'),
('Latin','latine','la'),
('Luxembourgish','Lëtzebuergesch','lb'),
('Luganda','Luganda','lg'),
('Lingala','Lingála','ln'),
('Lao','ພາສາລາວ','lo'),
('Lithuanian','lietuvių kalba','lt'),
('Luba-Katanga','','lu'),
('Latvian','latviešu valoda','lv'),
('Malagasy','Malagasy fiteny','mg'),
('Marshallese','Kajin M̧ajeļ','mh'),
('Manx','"Gaelg, Gailck"','gv'),
('Māori','te reo Māori','mi'),
('Macedonian','македонски јазик','mk'),
('Malayalam','മലയാളം','ml'),
('Mongolian','Монгол','mn'),
('Marathi','मराठी','mr'),
('Malay','"bahasa Melayu, بهاس ملايو‎"','ms'),
('Maltese','Malti','mt'),
('Nauru','Ekakairũ Naoero','na'),
('North Ndebele','isiNdebele','nd'),
('Nepali','नेपाली','ne'),
('Ndonga','Owambo','ng'),
('Dutch','Nederlands','nl'),
('Norwegian','Norsk','no'),
('South Ndebele','isiNdebele','nr'),
('Navajo','Diné bizaad','nv'),
('Oromo','Afaan Oromoo','om'),
('Oriya','ଓଡ଼ିଆ','or'),
('Ossetian','Ирон æвзаг','os'),
('Punjabi','"ਪੰਜਾਬੀ','pa'),
('Pāli','पाऴि','pi'),
('Persian','فارسی','fa'),
('Polish','polski','pl'),
('Portuguese','Português','pt'),
('Quechua','Kichwa','qu'),
('Kirundi','Rundi','rn'),
('Romanian','română','ro'),
('Russian','Русский язык','ru'),
('Kinyarwanda','Ikinyarwanda','rw'),
('Sanskrit','संस्कृतम्','sa'),
('Sardinian','sardu','sc'),
('Sindhi','"सिन्धी, سنڌي، سندھی‎"','sd'),
('Northern Sami','Davvisámegiella','se'),
('Samoan','gagana fa''a Samoa','sm'),
('Sango','yângâ tî sängö','sg'),
('Serbian','српски језик','sr'),
('Gaelic','Gàidhlig','gd'),
('Shona','chiShona','sn'),
('Sinhala','සිංහල','si'),
('Slovak','slovenčina','sk'),
('Slovene','slovenščina','sl'),
('Somali','Soomaaliga','so'),
('Southern Sotho','Sesotho','st'),
('Sundanese','Basa Sunda','su'),
('Swahili','Kiswahili','sw'),
('Swati','SiSwati','ss'),
('Swedish','svenska','sv'),
('Tamil','தமிழ்','ta'),
('Telugu','తెలుగు','te'),
('Tajik','toğikī','tg'),
('Thai','ไทย','th'),
('Tigrinya','ትግርኛ','ti'),
('Tibetan','བོད་ཡིག','bo'),
('Turkmen','Türkmen','tk'),
('Tagalog','Wikang Tagalog','tl'),
('Tswana','Setswana','tn'),
('Tonga','faka Tonga','to'),
('Turkish','Türkçe','tr'),
('Tsonga','Xitsonga','ts'),
('Tatar','tatarça','tt'),
('Twi','Twi','tw'),
('Tahitian','Reo Mā`ohi','ty'),
('Uighur','Uyƣurqə','ug'),
('Ukrainian','Українська','uk'),
('Urdu','اردو','ur'),
('Uzbek','O''zbek','uz'),
('Venda','Tshivenḓa','ve'),
('Vietnamese','Tiếng Việt','vi'),
('Volapük','Volapük','vo'),
('Walloon','Walon','wa'),
('Welsh','Cymraeg','cy'),
('Wolof','Wollof','wo'),
('Xhosa','isiXhosa','xh'),
('Yoruba','Yorùbá','yo'),
('Zhuang','Saw cuengh','za'),
('Zulu','isiZulu','zu');

7 comments:

  1. I can't catch the point of adding ID as a primary key, as ISO639-1 actually IS a primary key (by definition).

    ReplyDelete
  2. Thanks! Couldn't find an SQL dump with native language names.

    ReplyDelete
  3. Where's Spanish?

    ReplyDelete
  4. Those who are memory conscious may want to swap out the VARCHAR(45) for CHAR(2) since ISO-639-1 codes are always 2 char values.

    ReplyDelete
  5. useful information on topics that plenty are interested on for this wonderful post.Admiring the time and effort you put into your b!.. ACMarket iOS 11

    ReplyDelete
  6. This is my first time visit here. From the tons of comments on your articles,I guess I am not only one having all the enjoyment right here! HipStore

    ReplyDelete