Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where to get world language/nationality list in sql format?

Tags:

mysql

I am looking for world language & nationality/ethnic race list in sql format. Is there any resource which is importable into MySql ?

like image 424
taras Avatar asked Jan 23 '23 09:01

taras


1 Answers

Old question, but I believe these resources could greatly help more visitors.

The ISO639-3-standard is ridiculously extensive, aiming to to maintain every single language ever conceived by humankind; spoken, sign, contemporary and extinct alike. Therefore, the ISO639-2 standard is much more suitable for most cases.

The ISO639-2 standard can be downloaded here*.

Regarding demography and ethnicity, Countrylist.net has great resources for all of those, from a geographical basis. I use this list a lot in my projects.

* The lists are pipe-separated, so they're not SQL as you requested, but can easily be imported thus:

-- Create table to hold the data.
create table language (
  id int(5) unsigned auto_increment primary key,
  bibliographical char(3) not null,
  terminological char(3) default null,
  alpha2 char(2) default null,
  name_en varchar(80) not null,
  name_fr varchar(80) not null
) engine=innodb default charset=utf8;

-- Fill the table with the ISO-639-2 data.
load data local infile "ISO-639-2_8859-1.txt" into table language fields terminated by "|" (bibliographical, terminological, alpha2, name_en, name_fr);
like image 152
Helge Talvik Söderström Avatar answered Jan 25 '23 21:01

Helge Talvik Söderström