Sunday, May 3, 2009

Mobile Operators/Carriers list from AdMob as SQL inserts

Update: You might want to consider a checking this newer post about mobile operators/carriers.

In this post: Mobile Operators/Carriers list from Wikipedia as SQL inserts I gave a full mobile operator list as SQL inserts. The list is taken from the Wikipedia page: Mobile Network Code. Apparently, this is not a user friendly list. The data in this list is built mostly on the mobile operator’s MCC and MNC. MCC stands for: Mobile Country Code and MNC stands for: Mobile Network Code. The problem with MNC is that each mobile company can have more than one MNC. This causes the list to have redundant data (there are duplicate companies in the list). I though that by taking of the duplicate companies I will have a neat and clean list of mobile operator companies. Aperantly I was wrong. It seems like Wikipedia did a bit too good job, since it gives the mobile operators in a great detail. For example: The Indian cellular company Airtel appears on the Wikipedia list many times under several similar names. For example: Baharti Airtel, Airtel Mumbai, Airtel Gujrat and so on. All these companies should be simply treated as Aitrel. This issue appears widely all over the Wikipedia list. So, I searched for another way of constructing a good mobile operator list and came across the of AdMob (mobile advertising network). On AdMob ad creation screen there is Countries/Mobile Operators targeting. This is a 3 levels tree allowing to select mobile advertising targeting for:
  • First level: Continents (for example, North America).
  • Second level: Country.
  • Third level: Mobile operator.
I made a small investigation and found out that by making a call to the following url:
http://www.admob.com/ajax/targeting/countries/ (Note, you have to be logged to AdMob in order to access this url)
AdMob returns a JSON object containing all the tree data. The data was not plain and ready and some manipulations had to be done in order to extract mobile operators information:
  • The 3 levels hierarchy had to be ignored and only mobile operators had to be extracted: This can be over come by simply making 3 loops and taking only the loop of the third level. In addition, there is a property indicating if a node in the tree is a leaf.
  • Country code contained prefix of: CC. This can be easily remove using JavaScript substring.
  • Not all operators are actually mobile operators: None mobile operators can be ignore by checking a property named: isMobile.
  • There are mobile operator entries named “Other” that are not needed: These entries can be ignored by testing that the mobile operator id does not contain the id: OTHER_CC.
After overcoming all these small issues I came with a small JavaScript code that converts AdMob JSON object to a list of SQL inserts. The nice thing is, that the code can easily allow you to make maintenance to the list from time to time when AdMob are making updates, since all you have to do is simply copy and paste the list returned for the url and run the JavaScript code.
This is a small MySQL script that creates the mobile operators table:
CREATE TABLE `mobile_operator` (
`country_code` CHAR( 2 ) NOT NULL ,
`operator_code` VARCHAR( 30 ) NOT NULL ,
`name` VARCHAR( 50 ) NOT NULL ,
PRIMARY KEY ( `country_code` , `operator_code` )
) ENGINE = innodb;
And this is the HTML/JavaScript code that creates the SQL inserts. Note that JSON object taken from AdMob is not in this code, since it is too big to be added. You can find the complete version on this link:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> Ad Mob operators list </title>
</head>
<body>
<script LANGUAGE="JavaScript">
// Note: This is not the full AdMob object. The code containing the full object is attached to this post.
var adMobOperators = [{"text":"North America","checkedState":2,...{"text":"Wallis and Futuna","checkedState":2,"c_id":["CCWF"],"leaf":true}]}];
var count = 0;
for (var i = 0; i < adMobOperators.length; i++)
{
var countries = adMobOperators[i].children;
for (var j = 0; j < countries.length; j++)
{
var country = countries[j];
var countryId = (country.c_id + "").substring(2);    
var operators = country.children;
if (operators != null)
{
for (k = 0; k < operators.length; k++)
{
var operator = operators[k];
if (operator.leaf)
{            
var operatorId = operator.c_id + "";
if (operatorId.indexOf("OTHER_CC") < 0 && operator.isMobile)
{
count++;
document.write("insert into sys_mobile_operator " +                     
"values ('" + countryId + "', '" + operatorId + "', '" + operator.text.replace(/\'/g) + ")<br/>");
}                
}
}
}
}
}
</script>
</body>
</html>
And the result SQL inserts this code generates:
insert into mobile_operator values ('BM', 'M3BMU', 'M3 Wireless Bermuda');
insert into mobile_operator values ('CA', 'BELLMOBILITYCAN', 'Bell Mobility Canada');
insert into mobile_operator values ('CA', 'MTSALLSTREAMCAN', 'MTS Allstream Canada');
insert into mobile_operator values ('CA', 'ROGERSCAN', 'Rogers Wireless Canada');
insert into mobile_operator values ('CA', 'SASKTEL', 'SaskTel Canada');
insert into mobile_operator values ('CA', 'TELUSMOBILITY', 'Telus Mobility Canada');
insert into mobile_operator values ('CA', 'VIRGINMOBILECAN', 'Virgin Mobile Canada');
insert into mobile_operator values ('GL', 'TELEGRL', 'Tele Greenland');
insert into mobile_operator values ('US', 'ALASKACOMMUSA', 'Alaska Communications Systems');
insert into mobile_operator values ('US', 'ALLTELUSA', 'Alltel USA');
insert into mobile_operator values ('US', 'AMAZONAWSUSA', 'Amazon Web Services');
insert into mobile_operator values ('US', 'APPALACHIANWIRELESSUSA', 'Appalachian Wireless USA');
insert into mobile_operator values ('US', 'CINGULARUSA', 'AT&T Mobility USA');
insert into mobile_operator values ('US', 'BLUEGRASSUSA', 'Bluegrass Cellular USA');
insert into mobile_operator values ('US', 'BOOSTUSA', 'Boost USA');
insert into mobile_operator values ('US', 'CELLCOMUSA', 'Cellcom USA');
insert into mobile_operator values ('US', 'CELLONEUSA', 'Cellular One USA');
insert into mobile_operator values ('US', 'CELLULARSOUTHUS', 'Cellular South USA');
insert into mobile_operator values ('US', 'CENTENNIALUSA', 'Centennial Wireless (Michiana Metronet) USA');
insert into mobile_operator values ('US', 'CINCINNATIBELLUS', 'Cincinnati Bell');
insert into mobile_operator values ('US', 'CLEARSKYUSA', 'ClearSky Mobile Media USA (Hosted WAP Gateways)');
insert into mobile_operator values ('US', 'COMMNETWIRELESSUSA', 'Commnet Wireless USA');
insert into mobile_operator values ('US', 'CORRUSA', 'Corr Wireless USA');
insert into mobile_operator values ('US', 'CRICKETUS', 'Cricket Wireless USA');
insert into mobile_operator values ('US', 'CSDCOUSA', 'CSDCO USA (Hosted WAP Gateways)');
insert into mobile_operator values ('US', 'DANGERUS', 'Danger');
insert into mobile_operator values ('US', 'DOBSONUSA', 'Dobson USA');
insert into mobile_operator values ('US', 'EDGEWIRELESSUSA', 'Edge Wireless USA');
insert into mobile_operator values ('US', 'EINSTEINWIRELESSUSA', 'Einstein Wireless (Airadigm) USA');
insert into mobile_operator values ('US', 'FIVESTARUSA', 'Five Star Wireless');
insert into mobile_operator values ('US', 'GOAMERICAUSA', 'GoAmerica USA');
insert into mobile_operator values ('US', 'GOLDENSTATECELLUSA', 'Golden State Cellular');
insert into mobile_operator values ('US', 'HARGRAYUSA', 'Hargray USA');
insert into mobile_operator values ('US', 'HELIOUS', 'Helio USA');
insert into mobile_operator values ('US', 'INLANDCELLUSA', 'Inland Cellular USA');
insert into mobile_operator values ('US', 'INTEROPTECHUSA', 'Interop Technologies USA (Hosted WAP Gateways)');
insert into mobile_operator values ('US', 'KINDLEQUALCOMMUSA', 'Kindle Gateway (Qualcomm) USA');
insert into mobile_operator values ('US', 'LEACOUSA', 'Leaco Rural Wireless USA');
insert into mobile_operator values ('US', 'LONGLINESUSA', 'Long Lines Wireless USA');
insert into mobile_operator values ('US', 'METROPCSUS', 'Metro PCS USA');
insert into mobile_operator values ('US', 'MOBIPCSUSA', 'Mobi PCS USA');
insert into mobile_operator values ('US', 'NEXTECHUSA', 'NEX-TECH USA');
insert into mobile_operator values ('US', 'NEXTELUSA', 'Nextel USA');
insert into mobile_operator values ('US', 'NOVCSDUSA', 'North Valley Communications South Dakota USA');
insert into mobile_operator values ('US', 'OPENWAVEUSA', 'Openwave Systems USA (Hosted WAP Gateways)');
insert into mobile_operator values ('US', 'PINECELLULARUSA', 'Pine Cellular USA');
insert into mobile_operator values ('US', 'PIONEERCELLUSA', 'Pioneer Cellular USA');
insert into mobile_operator values ('US', 'PLATEAUTELUSA', 'Plateautel Wireless USA');
insert into mobile_operator values ('US', 'POCKETUSA', 'Pocket Communications USA');
insert into mobile_operator values ('US', 'RIMUSA', 'Research In Motion USA');
insert into mobile_operator values ('US', 'REVOLUSA', 'Revol Wireless USA');
insert into mobile_operator values ('US', 'ADAMSUSA', 'Simmetry (Adams) USA');
insert into mobile_operator values ('US', 'SOUTHERNLINCUSA', 'SouthernLINC USA');
insert into mobile_operator values ('US', 'SPRINTPCSUSA', 'Sprint PCS USA');
insert into mobile_operator values ('US', 'SRTWIRELESSUSA', 'SRT Communications USA');
insert into mobile_operator values ('US', 'STARSEARCHUSA', 'Star Search Rural Cellular (Oklahoma Western Telephone) USA');
insert into mobile_operator values ('US', 'SUNCOMUSA', 'Suncom Wireless USA (Triton PCS)');
insert into mobile_operator values ('US', 'TMOBILEUSA', 'T-Mobile USA');
insert into mobile_operator values ('US', 'THUMBUSA', 'Thumb Cellular (Agri Valley Communications) USA');
insert into mobile_operator values ('US', 'USCELLULARUSA', 'U.S. Cellular USA');
insert into mobile_operator values ('US', 'UBETWIRELESSUSA', 'UBET Wireless USA');
insert into mobile_operator values ('US', 'UNICELUSA', 'UNICEL (Rural Cellular) USA');
insert into mobile_operator values ('US', 'UNIONTELUSA', 'Union Telephone Company');
insert into mobile_operator values ('US', 'VERIZONUSA', 'Verizon Wireless USA');
insert into mobile_operator values ('US', 'VIAEROUSA', 'Viaero USA');
insert into mobile_operator values ('US', 'VIRGINUSA', 'Virgin Mobile USA');
insert into mobile_operator values ('US', 'WESTCENTRALWIRELESSUSA', 'West Central Wireless USA');
insert into mobile_operator values ('US', 'WESTLINKUSA', 'Westlink Communications USA');
insert into mobile_operator values ('US', 'WDSPCOUSA', 'Wireless Data Service Provider Corporation');
insert into mobile_operator values ('AR', 'CTIMOVILARG', 'Claro Argentina');
insert into mobile_operator values ('AR', 'NEXTELARG', 'Nextel Argentina');
insert into mobile_operator values ('AR', 'TELEPERSONALARG', 'Telecom Personal Argentina');
insert into mobile_operator values ('AR', 'TELEFONICAARG', 'Telefonica Movistar Argentina');
insert into mobile_operator values ('AW', 'SETARABW', 'Setar Aruba');
insert into mobile_operator values ('BS', 'BATELNETBHS', 'Bahamas Telecommunications Company');
insert into mobile_operator values ('BB', 'CABLEWIRELESSBRB', 'Cable & Wireless Barbados');
insert into mobile_operator values ('BO', 'ENTELBOL', 'Entel Bolivia');
insert into mobile_operator values ('BO', 'NUEVATELBOL', 'Nuevatel Bolivia');
insert into mobile_operator values ('BO', 'TIGOBOL', 'Tigo (Telefonica/Telecel) Bolivia');
insert into mobile_operator values ('BR', 'BRASILTELECOMBR', 'Brasil Telecom Celular');
insert into mobile_operator values ('BR', 'CLAROBR', 'Claro Brazil');
insert into mobile_operator values ('BR', 'CTBCBRA', 'CTBC Brazil');
insert into mobile_operator values ('BR', 'EMBRATELBRA', 'Embratel Brazil');
insert into mobile_operator values ('BR', 'OIBRA', 'Oi Brazil');
insert into mobile_operator values ('BR', 'SERCOMTELBR', 'Sercomtel Celular Brazil');
insert into mobile_operator values ('BR', 'TELEMIGBR', 'Telemig Celular Brazil');
insert into mobile_operator values ('BR', 'TIMBR', 'TIM Brazil');
insert into mobile_operator values ('BR', 'VIVOBR', 'Vivo Brazil');
insert into mobile_operator values ('CL', 'CLAROCHL', 'Claro Chile');
insert into mobile_operator values ('CL', 'ENTELCHL', 'Entel Chile');
insert into mobile_operator values ('CL', 'TELEFONICACHL', 'Telefonica Chile');
insert into mobile_operator values ('CO', 'COMCELCOL', 'Comcel Colombia');
insert into mobile_operator values ('CO', 'TELEFONICACOL', 'Telefonica Colombia');
insert into mobile_operator values ('CO', 'TIGOCOL', 'Tigo (Colombia Movil/EPM/UNE) Colombia');
insert into mobile_operator values ('CR', 'GRUPOICECRI', 'Grupo ICE Costa Rica');
insert into mobile_operator values ('CU', 'CUBACELCUB', 'Cubacel');
insert into mobile_operator values ('DO', 'CLARODOM', 'Claro Dominican Republic');
insert into mobile_operator values ('DO', 'ORANGEDOM', 'Orange Dominican Republic');
insert into mobile_operator values ('DO', 'TRICOMDOM', 'Tricom/Viva (Trilogy Dominicana)');
insert into mobile_operator values ('EC', 'TELECSAECU', 'Alegro GSM Ecuador');
insert into mobile_operator values ('EC', 'PORTAECU', 'Porta (América Móvil) Ecuador');
insert into mobile_operator values ('EC', 'TELEFONICAECU', 'Telefonica Ecuador');
insert into mobile_operator values ('SV', 'DIGICELSLV', 'Digicel El Salvador');
insert into mobile_operator values ('SV', 'MOVISTARSLV', 'Telefonica Movistar El Salvador');
insert into mobile_operator values ('SV', 'TELEMOVILSLV', 'Telemovil El Salvador');
insert into mobile_operator values ('GP', 'ORANGEGLP', 'Orange Guadeloupe');
insert into mobile_operator values ('GT', 'TELGUAGT', 'Claro (Telgua) Guatemala');
insert into mobile_operator values ('GT', 'COMCELGTM', 'COMCEL Guatemala');
insert into mobile_operator values ('GY', 'CELLINKGUY', 'Cellink Guayana (GT&T)');
insert into mobile_operator values ('HT', 'COMCELHTI', 'Voila (Comcel) Haiti');
insert into mobile_operator values ('HN', 'TIGOHND', 'Tigo (CELTEL, Millicom) Honduras');
insert into mobile_operator values ('JM', 'BMOBILEJAM', 'bMobile Jamaica (Cable & Wireless)');
insert into mobile_operator values ('JM', 'DIGICELJAM', 'Digicel Jamaica');
insert into mobile_operator values ('MX', 'IUSACELLMEX', 'Iusacell Mexico');
insert into mobile_operator values ('MX', 'TELCELMEX', 'Telcel (América Móvil) Mexico');
insert into mobile_operator values ('MX', 'TELEFONICAMEX', 'Telefonica Mexico');
insert into mobile_operator values ('AN', 'TELCELLANT', 'Telcell St Maarten, Netherlands Antilles');
insert into mobile_operator values ('NI', 'ENITELNIC', 'Claro (Enitel) Nicaragua');
insert into mobile_operator values ('PA', 'DIGICELPAN', 'Digicel Panama');
insert into mobile_operator values ('PA', 'MOVILPAN', 'Móvil (Cable & Wireless) Panama');
insert into mobile_operator values ('PA', 'TELEFONICAPAN', 'Telefonica Panama');
insert into mobile_operator values ('PY', 'NUCLEOPRY', 'Nucleo Personal PARAGUAY');
insert into mobile_operator values ('PY', 'TELECELPRY', 'Telecel Paraguay');
insert into mobile_operator values ('PY', 'HOLAVOXPRY', 'VOX (Hola Paraguay)');
insert into mobile_operator values ('PE', 'AMERICAMOVILPER', 'America Movil (Claro) Peru');
insert into mobile_operator values ('PE', 'CLAROPER', 'Claro Peru');
insert into mobile_operator values ('PE', 'TELEFONICAPER', 'Telefonica Movistar Peru');
insert into mobile_operator values ('PR', 'CENTENNIALPRI', 'Centennial de Puerto Rico');
insert into mobile_operator values ('PR', 'OPENMOBILEPR', 'Open Mobile Puerto Rico');
insert into mobile_operator values ('PR', 'VERIZONPRI', 'Verizon Wireless Puerto Rico');
insert into mobile_operator values ('SR', 'TELESUR', 'TELESUR.GSM Suriname');
insert into mobile_operator values ('SR', 'UTSSUR', 'Uniqa Suriname & UTS Netherlands Antilles');
insert into mobile_operator values ('TT', 'DIGICELTTO', 'Digicel Trinidad and Tobago');
insert into mobile_operator values ('TT', 'TSTTTTO', 'TSTT (bMobile) Trinidad and Tobago');
insert into mobile_operator values ('UY', 'ANCELURY', 'Ancel Uruguay');
insert into mobile_operator values ('UY', 'TELEFONICAURY', 'Telefonica Moviles Uruguay');
insert into mobile_operator values ('VE', 'DIGITELVEN', 'Digitel Venezuela');
insert into mobile_operator values ('VE', 'MOVILNETVEN', 'movilnet Venezuela');
insert into mobile_operator values ('VE', 'TELEFONICAVEN', 'Movistar (Telcel) Venezuela');
insert into mobile_operator values ('VG', 'CABLEWIRELESSVGB', 'Cable & Wireless British Virgin Islands');
insert into mobile_operator values ('AD', 'ANDORPACAND', 'Servei de Telecomunicacions dundefinedAndorra');
insert into mobile_operator values ('AT', 'THREEAUT', '3 Austria');
insert into mobile_operator values ('AT', 'MOBILKOMAUT', 'Mobilkom (A1) Austria');
insert into mobile_operator values ('AT', 'NOKIAHOSTINGAUT', 'Nokia Hosting Services Austria');
insert into mobile_operator values ('AT', 'ONEAUT', 'Orange (One) Austria');
insert into mobile_operator values ('AT', 'TMOBILEAUT', 'T-Mobile Austria');
insert into mobile_operator values ('BE', 'BASEBEL', 'BASE Belgium');
insert into mobile_operator values ('BE', 'MOBISTARBEL', 'Mobistar Belgium');
insert into mobile_operator values ('BE', 'PROXIMUSBEL', 'Proximus Belgium');
insert into mobile_operator values ('DK', 'SONOFONDNK', 'Sonofon Denmark');
insert into mobile_operator values ('DK', 'TDCDNK', 'TDC Denmark');
insert into mobile_operator values ('DK', 'TELIADNK', 'Telia Denmark');
insert into mobile_operator values ('FO', 'FOTELECOMFRO', 'Faroese Telecom GSM Faroe Islands');
insert into mobile_operator values ('FI', 'DNAFIN', 'DNA Finland');
insert into mobile_operator values ('FI', 'ELISAFIN', 'Elisa Finland');
insert into mobile_operator values ('FI', 'SAUNALAHTIFIN', 'Saunalahti (Elisa) Finland');
insert into mobile_operator values ('FI', 'SONERAFIN', 'TeliaSonera Finland');
insert into mobile_operator values ('FR', 'BOUYGTELFRA', 'Bouygues Telecom France');
insert into mobile_operator values ('FR', 'FRANCETELECOM', 'Orange France');
insert into mobile_operator values ('FR', 'SFR', 'SFR France');
insert into mobile_operator values ('FR', 'TELE2FRA', 'Tele2 France');
insert into mobile_operator values ('FR', 'ZEMOBILFRA', 'ZeMobile (Kertel) France');
insert into mobile_operator values ('DE', 'DEBITELDEU', 'Debitel Germany');
insert into mobile_operator values ('DE', 'EPLUSDEU', 'E-Plus Germany');
insert into mobile_operator values ('DE', 'O2DEU', 'O2 Germany');
insert into mobile_operator values ('DE', 'TMOBILEDEU', 'T-Mobile Germany');
insert into mobile_operator values ('DE', 'VODAFONEDEU', 'Vodafone D2 Germany');
insert into mobile_operator values ('GI', 'GIBTELGIB', 'Gibraltar Telecommunications');
insert into mobile_operator values ('GR', 'COSMOTEGRC', 'Cosmote Greece');
insert into mobile_operator values ('GR', 'TELESTETGRC', 'Telestet WIND Greece');
insert into mobile_operator values ('GR', 'VODAFONEGRC', 'Vodafone Greece');
insert into mobile_operator values ('GG', 'CWGGY', 'Cable & Wireless Guernsey GPRS');
insert into mobile_operator values ('IS', 'SIMINNISL', 'Iceland Telecom (Siminn)');
insert into mobile_operator values ('IS', 'NOVAISL', 'Nova Iceland');
insert into mobile_operator values ('IS', 'VODAFONEISL', 'Vodafone Iceland (Og Fjarskipti hf)');
insert into mobile_operator values ('IE', 'THREEIRL', '3 Ireland');
insert into mobile_operator values ('IE', 'METEORIRL', 'Meteor Ireland');
insert into mobile_operator values ('IE', 'O2IRL', 'O2 Ireland');
insert into mobile_operator values ('IE', 'VODAFONEIRL', 'Vodafone Ireland');
insert into mobile_operator values ('IT', 'THREEITA', '3 Italy');
insert into mobile_operator values ('IT', 'TELE2ITA', 'Tele2 (Vodafone) Italy');
insert into mobile_operator values ('IT', 'TIMITA', 'Telecom Italia Mobile');
insert into mobile_operator values ('IT', 'VODAFONEITA', 'Vodafone Italy');
insert into mobile_operator values ('IT', 'WINDITA', 'Wind Italy');
insert into mobile_operator values ('LU', 'LUXGSMLUX', 'LuxGSM (P & T, Vodafone) Luxembourg');
insert into mobile_operator values ('LU', 'TELE2LUX', 'Tele2 Luxembourg');
insert into mobile_operator values ('LU', 'VOXLUX', 'VOXmobile Luxembourg');
insert into mobile_operator values ('MT', 'GOMOBILEMLT', 'Go Mobile Malta');
insert into mobile_operator values ('MT', 'MELITAMOBILEMLT', 'Melita Mobile (3 G Telecoms) Malta');
insert into mobile_operator values ('MT', 'VODAFONEMLT', 'Vodafone Malta');
insert into mobile_operator values ('MD', 'EVENTISMDA', 'Eventis Moldova');
insert into mobile_operator values ('MD', 'IDCMDA', 'IDC CDMA Interdnestrcom Moldova');
insert into mobile_operator values ('MD', 'MOLDCELL', 'Moldcell Moldova');
insert into mobile_operator values ('MD', 'ORANGEMDA', 'Orange Moldova');
insert into mobile_operator values ('NL', 'KPNNLD', 'KPN (Telfort) Netherlands');
insert into mobile_operator values ('NL', 'TMOBILENLD', 'T-Mobile Netherlands');
insert into mobile_operator values ('NL', 'TELE2NLD', 'Tele2 Netherlands');
insert into mobile_operator values ('NL', 'VODAFONENLD', 'Vodafone Netherlands');
insert into mobile_operator values ('NO', 'MOBILENORWAY', 'Mobile Norway');
insert into mobile_operator values ('NO', 'NETCOMNOR', 'Netcom Norway');
insert into mobile_operator values ('NO', 'TDCMOBILNOR', 'TDC Mobil Norway');
insert into mobile_operator values ('NO', 'TELE2NOR', 'Tele2 Norway');
insert into mobile_operator values ('NO', 'TELENOR', 'Telenor Norway');
insert into mobile_operator values ('NO', 'VENTELONOR', 'Ventelo Norway');
insert into mobile_operator values ('PT', 'OPTIMUSPRT', 'Optimus Portugal');
insert into mobile_operator values ('PT', 'TMNPRT', 'TMN Portugal');
insert into mobile_operator values ('PT', 'VODAFONEPRT', 'Vodafone Portugal');
insert into mobile_operator values ('SM', 'SANMARINOTELECOMSMR', 'San Marino Telecom');
insert into mobile_operator values ('ES', 'ORANGEESP', 'Amena (Orange) Spain');
insert into mobile_operator values ('ES', 'SIMYOESP', 'Simyo Spain');
insert into mobile_operator values ('ES', 'TELEFONICAESP', 'Telefonica (Movistar) Spain');
insert into mobile_operator values ('ES', 'VODAFONEESP', 'Vodafone Spain');
insert into mobile_operator values ('ES', 'YOIGOESP', 'Yoigo (Xfera Moviles) Spain');
insert into mobile_operator values ('SE', 'THREESWE', '3 Sweden');
insert into mobile_operator values ('SE', 'SPRINGMOBILAWE', 'Spring Mobil Sweden');
insert into mobile_operator values ('SE', 'TELE2SWE', 'Tele2 Sweden');
insert into mobile_operator values ('SE', 'TELIASWE', 'Telia Sweden');
insert into mobile_operator values ('SE', 'VODAFONESWE', 'Vodafone (Telenor) Sweden');
insert into mobile_operator values ('CH', 'ORANGECHE', 'Orange Switzerland');
insert into mobile_operator values ('CH', 'SUNRISECHE', 'Sunrise Switzerland');
insert into mobile_operator values ('CH', 'SWISSCOMCHE', 'Swisscom Switzerland');
insert into mobile_operator values ('GB', 'THREEUK', '3 UK');
insert into mobile_operator values ('GB', 'JERSEYAIRTELGBR', 'Jersey Airtel GB');
insert into mobile_operator values ('GB', 'JERSEYTELGB', 'Jersey Telecom GB');
insert into mobile_operator values ('GB', 'MANXUK', 'Manx Telecom Isle of Man');
insert into mobile_operator values ('GB', 'NOVARRAUK', 'Novarra Proxy UK');
insert into mobile_operator values ('GB', 'O2UK', 'O2 UK');
insert into mobile_operator values ('GB', 'ORANGEUK', 'Orange UK');
insert into mobile_operator values ('GB', 'RIMUK', 'Research In Motion UK');
insert into mobile_operator values ('GB', 'TMOBILEUK', 'T-Mobile UK');
insert into mobile_operator values ('GB', 'VODAFONEUK', 'Vodafone UK');
insert into mobile_operator values ('AL', 'EAGLEALB', 'Eagle Mobile Albania');
insert into mobile_operator values ('BY', 'BESTBLR', 'BeST Belarus');
insert into mobile_operator values ('BY', 'MTSBLR', 'Mobile TeleSystems Belarus');
insert into mobile_operator values ('BY', 'VELCOMBLR', 'Velcom Belarus');
insert into mobile_operator values ('BA', 'BHTELECOMSARAJEVO', 'BH Telecom d.d. Sarajevo');
insert into mobile_operator values ('BA', 'HTERONETBIH', 'HT-ERONET Bosnia');
insert into mobile_operator values ('BA', 'MOBISBIH', 'm:tel (MOBI’S) Bosnia');
insert into mobile_operator values ('BG', 'GLOBULBGR', 'GLOBUL Bulgaria');
insert into mobile_operator values ('BG', 'MTELBGR', 'M-Tel Bulgaria');
insert into mobile_operator values ('BG', 'VIVATELBGR', 'vivatel Bulgaria');
insert into mobile_operator values ('HR', 'TMOBILEHRV', 'T-Mobile Croatia');
insert into mobile_operator values ('HR', 'TELE2HRV', 'Tele2 Croatia');
insert into mobile_operator values ('HR', 'VIPNETHRV', 'VIPnet Croatia');
insert into mobile_operator values ('CZ', 'TMOBILECZE', 'T-Mobile Czech Republic');
insert into mobile_operator values ('CZ', 'TELEFONICAO2CZE', 'Telefónica O2 Czech Republic (Eurotel Praha)');
insert into mobile_operator values ('CZ', 'VODAFONECZE', 'Vodafone Czech Republic');
insert into mobile_operator values ('EE', 'ELISAEST', 'Elisa Estonia');
insert into mobile_operator values ('EE', 'EMTEST', 'EMT Estonia');
insert into mobile_operator values ('EE', 'TELE2EST', 'Tele2 Estonia');
insert into mobile_operator values ('HU', 'PANNONGSMHUN', 'Pannon GSM Hungary');
insert into mobile_operator values ('HU', 'TMOBILEHUN', 'T-Mobile Hungary');
insert into mobile_operator values ('HU', 'VODAFONEHUN', 'Vodafone Hungary');
insert into mobile_operator values ('LV', 'LMTLVA', 'LMT Latvia');
insert into mobile_operator values ('LV', 'TELE2LVA', 'Tele2 Latvia');
insert into mobile_operator values ('LT', 'BITELTU', 'Bite Lithuania');
insert into mobile_operator values ('LT', 'OMNITELLTU', 'Omnitel Lithuania');
insert into mobile_operator values ('LT', 'TELE2LTU', 'Tele2 Lithuania');
insert into mobile_operator values ('MK', 'COSMOFONMKD', 'COSMOFON Macedonia');
insert into mobile_operator values ('MK', 'TMOBILEMKD', 'T-Mobile Macedonia');
insert into mobile_operator values ('MK', 'VIPOPERATORMKD', 'VIP Operator Macedonia');
insert into mobile_operator values ('ME', 'MTELMNE', 'm:tel Montenegro');
insert into mobile_operator values ('ME', 'PROMONTEMNE', 'Promonte Montenegro');
insert into mobile_operator values ('ME', 'MONETMNE', 'T-Mobile Montenegro');
insert into mobile_operator values ('PL', 'ERAPOL', 'Era Poland');
insert into mobile_operator values ('PL', 'PLAYPOL', 'Play Poland (P4 Sp. z o.o)');
insert into mobile_operator values ('PL', 'PLUSGSMPOL', 'Plus GSM Poland');
insert into mobile_operator values ('PL', 'ORANGEPOL', 'PTK Centertel (Orange) Poland');
insert into mobile_operator values ('RO', 'COSMOTEROU', 'Cosmote Romania');
insert into mobile_operator values ('RO', 'ORANGEROM', 'Orange Romania');
insert into mobile_operator values ('RO', 'MOBIFONROU', 'Vodafone (Mobifon) Romania');
insert into mobile_operator values ('RU', 'AQUAFONRUS', 'Aquafon Russia');
insert into mobile_operator values ('RU', 'BASHCELLRUS', 'Bashcell Russia');
insert into mobile_operator values ('RU', 'BAYKALWESTCOMRU', 'Baykalwestcom Russia');
insert into mobile_operator values ('RU', 'BEELINERU', 'Beeline Russia');
insert into mobile_operator values ('RU', 'BMTELECOMRUS', 'BM-Telecom (Bashkiria-Mobel Telecom) Russia (Ufa)');
insert into mobile_operator values ('RU', 'CENTERTELECOMRUS', 'CenterTelecom Russia');
insert into mobile_operator values ('RU', 'FAREASTRUS', 'Far East Cellular Systems Russia');
insert into mobile_operator values ('RU', 'CTEKRUS', 'JSC CTeK Russia (Cellular Telephone of Kuzbass GSM)');
insert into mobile_operator values ('RU', 'NCCSARATOVRUS', 'JSC Saratov-Mobile Russia');
insert into mobile_operator values ('RU', 'MEGAFONRUS', 'Megafon Russia');
insert into mobile_operator values ('RU', 'MTSRUS', 'Mobile TeleSystems Russia');
insert into mobile_operator values ('RU', 'MOTIVRUS', 'MOTIV (LLC Ekaterinburg-2000) Russia');
insert into mobile_operator values ('RU', 'MTTRUS', 'Multiregional Transit Telecom Russia');
insert into mobile_operator values ('RU', 'NEWTELCORUS', 'New Telephone Company Russia');
insert into mobile_operator values ('RU', 'NIZHEGORODSKAYARU', 'Nizhegorodskaya Cellular Communications Russia');
insert into mobile_operator values ('RU', 'ONGSMRUS', 'ON GSM Saratov');
insert into mobile_operator values ('RU', 'ORENBURGGSMRUS', 'Orenburg-GSM Russia');
insert into mobile_operator values ('RU', 'SAKHTELRUS', 'Sakhalin GSM Russia');
insert into mobile_operator values ('RU', 'SIBIRTELECOMRU', 'Sibirtelecom Russia');
insert into mobile_operator values ('RU', 'SKYLINKRUS', 'SkyLink Russia');
insert into mobile_operator values ('RU', 'SMARTSRUS', 'SMARTS Russia');
insert into mobile_operator values ('RU', 'STEKGSMRUS', 'STEK GSM Russia');
insert into mobile_operator values ('RU', 'TAIFRUS', 'TAIF Telcom Russia');
insert into mobile_operator values ('RU', 'TATINCOMTRUS', 'Tatincom-T Russia');
insert into mobile_operator values ('RU', 'TELE2RUS', 'Tele2 Russia');
insert into mobile_operator values ('RU', 'TRANSTKRUS', 'TransTeleKom Russia');
insert into mobile_operator values ('RU', 'ULGSMRUS', 'Ulyanovsk-GSM Russia');
insert into mobile_operator values ('RU', 'USIRUS', 'USI (Uralsvyazinform) Russia');
insert into mobile_operator values ('RU', 'VOLGATELECOMRUS', 'VolgaTelecom Russia');
insert into mobile_operator values ('RU', 'VOLGOGSMRUS', 'Volgograd-GSM Russia');
insert into mobile_operator values ('RS', 'IPKOSRB', 'IPKO Kosovo');
insert into mobile_operator values ('RS', 'TELEKOMYUG', 'Telekom Srbija');
insert into mobile_operator values ('RS', 'MOBTELYUG', 'Telenor (Mobtel) Serbia');
insert into mobile_operator values ('RS', 'VALASRB', 'Vala (PTK) Kosovo');
insert into mobile_operator values ('RS', 'VIPMOBILESRB', 'VIP Mobile Serbia');
insert into mobile_operator values ('SK', 'ORANGESVK', 'Orange Slovakia');
insert into mobile_operator values ('SK', 'TMOBILESVK', 'T-Mobile Slovakia');
insert into mobile_operator values ('SK', 'TELEFONICAO2SVK', 'Telefónica O2 Slovakia');
insert into mobile_operator values ('SI', 'MOBITELSVN', 'Mobitel Slovenia');
insert into mobile_operator values ('SI', 'SIMOBILESVN', 'Si.mobil Slovenia');
insert into mobile_operator values ('SI', 'T2SVN', 'T-2 d.o.o. Slovenia');
insert into mobile_operator values ('SI', 'TUSMOBILESVN', 'Tušmobil Slovenia');
insert into mobile_operator values ('UA', 'BEELINEUKR', 'Beeline (Ukrainian Radio Systems)');
insert into mobile_operator values ('UA', 'ITCCDMAUKR', 'CDMA Ukraine (ITC)');
insert into mobile_operator values ('UA', 'KYIVSTARUKR', 'Kyivstar Ukraine');
insert into mobile_operator values ('UA', 'LIFEUKR', 'Life Ukraine');
insert into mobile_operator values ('UA', 'UMCUKR', 'Ukrainian Mobile Communications (MTS)');
insert into mobile_operator values ('UA', 'UTELUKR', 'Utel Ukraine');
insert into mobile_operator values ('DZ', 'DJEZZYDZA', 'Djezzy Algeria');
insert into mobile_operator values ('DZ', 'MOBILISDZA', 'Mobilis Algeria');
insert into mobile_operator values ('DZ', 'WATANIYADZA', 'Nedjma (Wataniya) Algeria');
insert into mobile_operator values ('AO', 'UNITELAGO', 'Unitel Angola');
insert into mobile_operator values ('BJ', 'GLOMOBILEBEN', 'Glomobile Benin (GloBenin)');
insert into mobile_operator values ('BJ', 'MOOVBEN', 'Moov (Telecel) Benin');
insert into mobile_operator values ('BJ', 'MTNBEN', 'MTN (Areeba) Benin');
insert into mobile_operator values ('BW', 'MASCOMBWA', 'Mascom Wireless Botswana');
insert into mobile_operator values ('BW', 'ORANGEBWA', 'Orange Botswana');
insert into mobile_operator values ('BF', 'ONATELBFA', 'Onatel Burkina Faso');
insert into mobile_operator values ('CM', 'MTNCMR', 'MTN Cameroon');
insert into mobile_operator values ('CM', 'ORANGECMR', 'Orange Cameroon');
insert into mobile_operator values ('CV', 'CVMOVELCPV', 'CVMovel Cape Verde');
insert into mobile_operator values ('CF', 'MOOVCAF', 'Moov Central African Republic');
insert into mobile_operator values ('CF', 'ORANGECAF', 'Orange Centrafrique');
insert into mobile_operator values ('TD', 'MILLICOMTCD', 'Millicom Chad');
insert into mobile_operator values ('CG', 'MTNCOG', 'MTN Congo');
insert into mobile_operator values ('CG', 'SEAMOBILECOG', 'Seamobile Europe (Congo)');
insert into mobile_operator values ('CG', 'WARIDCOG', 'Warid Congo');
insert into mobile_operator values ('CD', 'CELTELCOD', 'Celtel/Zain Congo (Democratic Republic)');
insert into mobile_operator values ('CD', 'OASISTIGOCOD', 'Tigo (Oasis) Congo (Democratic Republic)');
insert into mobile_operator values ('CI', 'KOZCIV', 'KoZ (Comium Ivory Coast)');
insert into mobile_operator values ('CI', 'MOOVCIV', 'Moov (Atlantique Cellulaire) Cote dundefinedIvoire');
insert into mobile_operator values ('CI', 'MTNCIV', 'MTN Côte dundefinedIvoire');
insert into mobile_operator values ('CI', 'ORANGECIV', 'Orange Côte dundefinedIvoire');
insert into mobile_operator values ('DJ', 'EVATISDJI', 'Evatis (Djibouti Telecom)');
insert into mobile_operator values ('EG', 'ECMSMOBINILEGY', 'ECMS-Mobinil Egypt');
insert into mobile_operator values ('EG', 'ETISALATEGY', 'Etisalat Egypt');
insert into mobile_operator values ('EG', 'VODAFONEEGY', 'Vodafone Egypt');
insert into mobile_operator values ('GQ', 'ORANGEGNQ', 'Orange GETESA Equatorial Guinea');
insert into mobile_operator values ('ET', 'ETHMTNETH', 'Ethio-Mobile (Ethiopian Telecommunication Corporation)');
insert into mobile_operator values ('GA', 'LIBERTISGAB', 'Libertis Gabon');
insert into mobile_operator values ('GM', 'COMIUMGMB', 'Comium Gambia');
insert into mobile_operator values ('GH', 'MTNGHA', 'MTN (Scancom) Ghana');
insert into mobile_operator values ('GH', 'ONETOUCHGHA', 'One Touch Ghana');
insert into mobile_operator values ('GH', 'TIGOGHA', 'Tigo Ghana');
insert into mobile_operator values ('GH', 'ZAINGHA', 'Zain Ghana');
insert into mobile_operator values ('GN', 'MTNGIN', 'MTN (Areeba) Guinea-Conakry');
insert into mobile_operator values ('GN', 'SOTELGUIGIN', 'Sotelgui Guinea');
insert into mobile_operator values ('GW', 'MTNGNB', 'MTN Guinea-Bissau');
insert into mobile_operator values ('KE', 'CELTELKE', 'Celtel Kenya');
insert into mobile_operator values ('KE', 'ECONETKEN', 'Econet Wireless Kenya');
insert into mobile_operator values ('KE', 'ORANGEKEN', 'Orange Kenya (Telkom Kenya)');
insert into mobile_operator values ('KE', 'SAFARICOMKEN', 'Safaricom Limited Kenya');
insert into mobile_operator values ('LS', 'VODACOMLSO', 'Vodacom Lesotho');
insert into mobile_operator values ('LR', 'CELLCOMLBR', 'Cellcom Liberia');
insert into mobile_operator values ('LR', 'LIBERCELLLBR', 'Libercell (Atlantic Wireless) Liberia');
insert into mobile_operator values ('LR', 'LONESTARLBR', 'Lonestar Cell Liberia');
insert into mobile_operator values ('LY', 'ALMADARLBY', 'Al Madar Libya');
insert into mobile_operator values ('LY', 'LTTLBY', 'Libyan Telecom and Technology');
insert into mobile_operator values ('LY', 'LIBYANALBY', 'Libyana Mobile Phone');
insert into mobile_operator values ('MG', 'ORANGEMDG', 'Orange Madagascar');
insert into mobile_operator values ('MG', 'TELMAMDG', 'Telma Mobile Madagascar');
insert into mobile_operator values ('MW', 'ZAINMWI', 'Zain Malawi');
insert into mobile_operator values ('ML', 'ORANGEMLI', 'Orange (Ikatel) Mali');
insert into mobile_operator values ('ML', 'SOTELMLI', 'SOTELMA Mali');
insert into mobile_operator values ('MR', 'MATTELMRT', 'MATTEL Mauritania');
insert into mobile_operator values ('MU', 'EMTELMU', 'Emtel Mauritius');
insert into mobile_operator values ('MU', 'CELLPLUSMU', 'Orange (Cellplus) Mauritius');
insert into mobile_operator values ('MA', 'MAROCMAR', 'Maroc Telecom Morocco');
insert into mobile_operator values ('MA', 'MEDITELMAR', 'Meditel Morocco');
insert into mobile_operator values ('MZ', 'MCELMOZ', 'mCel Mozambique');
insert into mobile_operator values ('MZ', 'VODACOMMOZ', 'Vodacom Mozambique');
insert into mobile_operator values ('NA', 'MTCNAM', 'MTC Namibia');
insert into mobile_operator values ('NA', 'POWERCOMNAM', 'Powercom (Cell One) Namibia');
insert into mobile_operator values ('NE', 'MOOVNER', 'Moov Niger');
insert into mobile_operator values ('NE', 'ORANGENER', 'Orange Niger');
insert into mobile_operator values ('NG', 'CELTELNGA', 'Celtel/Zain Nigeria');
insert into mobile_operator values ('NG', 'EMTSMUBADALANGA', 'EMTS (Mubadala, Etisalat) Nigeria');
insert into mobile_operator values ('NG', 'GLOBACOMNGA', 'Glo Mobile (Globacom)');
insert into mobile_operator values ('NG', 'MTNNG', 'MTN Nigeria');
insert into mobile_operator values ('NG', 'RELTELNGA', 'Reltel Nigeria');
insert into mobile_operator values ('RE', 'ONLYREU', 'Only (Outremer) Reunion');
insert into mobile_operator values ('RE', 'ORANGEREU', 'Orange Réunion');
insert into mobile_operator values ('RW', 'MTNRWA', 'MTN Rwandacell');
insert into mobile_operator values ('RW', 'RWANDATELRWA', 'Rwandatel');
insert into mobile_operator values ('SN', 'SONATELSEN', 'Sonatel Senegal (Orange)');
insert into mobile_operator values ('SC', 'CABLEWIRELESSSYC', 'Cable & Wireless (Atlas) Seychelles');
insert into mobile_operator values ('SL', 'COMIUMSLE', 'Comium Sierra Leone');
insert into mobile_operator values ('SL', 'TIGOSLE', 'Tigo (Millicom) Sierra Leone');
insert into mobile_operator values ('SO', 'SOMAFONESOM', 'Somafone Somalia');
insert into mobile_operator values ('SO', 'STELSOM', 'St

Saturday, April 25, 2009

Getting Languages list in Java

In this post: Getting countries list in Java I wrote about how to get countries list in Java. Getting languages list is quite similar. In fact by making small changes to the code on the countries post languages list can be easily taken.

In order to get the countries list we used this static method of Locale class: Locale.getISOCountries(). Getting languages list is quite similar and can be taken by using this method: Locale.getISOLanguages(). This method returns String array containing all language codes compatible with ISO 639 standard (2 letters code).

Similar to the countries list, we will use a class named Language to store information of a single language:

package com.bashan.blog;
public class Language {
  private String languageCode;
  private String name;
  public Language() {
  }
  public Language(String languageCode, String name) {
    this.languageCode = languageCode;
    this.name = name;
  }
  public String getLanguageCode() {
    return languageCode;
  }
  public void setLanguageCode(String languageCode) {
    this.languageCode = languageCode;
  }
  public String getName() {
    return name;
  }
  public void setName(String name) {
    this.name = name;
  }
  public String toString() {
    return languageCode + ", " + name;
  }
}
And the class LanguageUtil is very similar to CountyUtil, but instead of countries it returns languages:
package com.bashan.blog;
import java.util.*;
public class LanguageUtil {
  public static List<Language> getLanguages(final Locale inLocale) {
    String[] languageCodes = Locale.getISOLanguages();
    List<Language> languages = new ArrayList<Language>(languageCodes.length);
    for (String languageCode : languageCodes) {
      languages.add(new Language(languageCode, new Locale(languageCode, "").getDisplayLanguage(inLocale)));
    }
    Collections.sort(languages, new Comparator<Language>() {
      public int compare(Language c1, Language c2) {
        return c1.getName().compareTo(c2.getName());
      }
    });
    return languages;
  }
  public static Map<String, String> getLanguagesMap(final Locale inLocale) {
    List<Language> countries = getLanguages(inLocale);
    Map<String, String> countriesMap = new LinkedHashMap<String, String>(countries.size());
    for (Language country : countries) {
      countriesMap.put(country.getLanguageCode(), country.getName());
    }
    return countriesMap;
  }
  public static void printLanguages(List<Language> languages) {
    for (Language language : languages) {
      System.out.println(language);
    }
  }
  public static void main(String[] args) {
    // Get list of countries in US English
    System.out.println("---- List of languages in English ----");
    List<Language> languages = getLanguages(Locale.US);
    printLanguages(languages);
    System.out.println("\n\n---- List of languages in Japanese ----");
    // Get list of countries in Japanese
    languages = getLanguages(Locale.JAPANESE);
    printLanguages(languages);
  }
}

And the output for our small test program, which prints all languages once in English and once in Japanese:
---- List of languages in English ----
ab, Abkhazian
aa, Afar
af, Afrikaans
ak, Akan
sq, Albanian
am, Amharic
ar, Arabic
an, Aragonese
hy, Armenian
as, Assamese
av, Avaric
ae, Avestan
ay, Aymara
az, Azerbaijani
bm, Bambara
ba, Bashkir
eu, Basque
be, Belarusian
bn, Bengali
bh, Bihari
bi, Bislama
bs, Bosnian
br, Breton
bg, Bulgarian
my, Burmese
ca, Catalan
ch, Chamorro
ce, Chechen
zh, Chinese
cu, Church Slavic
cv, Chuvash
kw, Cornish
co, Corsican
cr, Cree
hr, Croatian
cs, Czech
da, Danish
dv, Divehi
nl, Dutch
dz, Dzongkha
en, English
eo, Esperanto
et, Estonian
ee, Ewe
fo, Faroese
fj, Fijian
fi, Finnish
fr, French
fy, Frisian
ff, Fulah
gl, Gallegan
lg, Ganda
ka, Georgian
de, German
el, Greek
kl, Greenlandic
gn, Guarani
gu, Gujarati
ht, Haitian
ha, Hausa
he, Hebrew
iw, Hebrew
hz, Herero
hi, Hindi
ho, Hiri Motu
hu, Hungarian
is, Icelandic
io, Ido
ig, Igbo
id, Indonesian
in, Indonesian
ia, Interlingua
ie, Interlingue
iu, Inuktitut
ik, Inupiaq
ga, Irish
it, Italian
ja, Japanese
jv, Javanese
kn, Kannada
kr, Kanuri
ks, Kashmiri
kk, Kazakh
km, Khmer
ki, Kikuyu
rw, Kinyarwanda
ky, Kirghiz
kv, Komi
kg, Kongo
ko, Korean
ku, Kurdish
kj, Kwanyama
lo, Lao
la, Latin
lv, Latvian
li, Limburgish
ln, Lingala
lt, Lithuanian
lu, Luba-Katanga
lb, Luxembourgish
mk, Macedonian
mg, Malagasy
ms, Malay
ml, Malayalam
mt, Maltese
gv, Manx
mi, Maori
mr, Marathi
mh, Marshallese
mo, Moldavian
mn, Mongolian
na, Nauru
nv, Navajo
ng, Ndonga
ne, Nepali
nd, North Ndebele
se, Northern Sami
no, Norwegian
nb, Norwegian Bokmål
nn, Norwegian Nynorsk
ny, Nyanja
oc, Occitan
oj, Ojibwa
or, Oriya
om, Oromo
os, Ossetian
pi, Pali
pa, Panjabi
fa, Persian
pl, Polish
pt, Portuguese
ps, Pushto
qu, Quechua
rm, Raeto-Romance
ro, Romanian
rn, Rundi
ru, Russian
sm, Samoan
sg, Sango
sa, Sanskrit
sc, Sardinian
gd, Scottish Gaelic
sr, Serbian
sn, Shona
ii, Sichuan Yi
sd, Sindhi
si, Sinhalese
sk, Slovak
sl, Slovenian
so, Somali
nr, South Ndebele
st, Southern Sotho
es, Spanish
su, Sundanese
sw, Swahili
ss, Swati
sv, Swedish
tl, Tagalog
ty, Tahitian
tg, Tajik
ta, Tamil
tt, Tatar
te, Telugu
th, Thai
bo, Tibetan
ti, Tigrinya
to, Tonga
ts, Tsonga
tn, Tswana
tr, Turkish
tk, Turkmen
tw, Twi
ug, Uighur
uk, Ukrainian
ur, Urdu
uz, Uzbek
ve, Venda
vi, Vietnamese
vo, Volapük
wa, Walloon
cy, Welsh
wo, Wolof
xh, Xhosa
ji, Yiddish
yi, Yiddish
yo, Yoruba
za, Zhuang
zu, Zulu


---- List of languages in Japanese ----
is, アイスランド語
ay, アイマラ語
ga, アイルランド語
ak, アカン語
az, アゼルバイジャン語
as, アッサム語
aa, アファール語
af, アフリカーンス語
ab, アブハズ語
am, アムハラ語
an, アラゴン語
ar, アラビア語
sq, アルバニア語
hy, アルメニア語
av, アヴァル語
ae, アヴェスタ語
it, イタリア語
ji, イディッシュ語
yi, イディッシュ語
io, イド語
iu, イヌクウティトット語
ik, イヌピアック語
ig, イボ語
id, インドネシア語
in, インドネシア語
ug, ウイグル語
cy, ウェールズ語
wo, ウォロフ語
uk, ウクライナ語
uz, ウズベク語
ur, ウルドゥー語
ee, エウェ語
et, エストニア語
eo, エスペラント語
oj, オジブワ語
os, オセチア語
nl, オランダ語
or, オリヤー語
kk, カザフ語
ks, カシミール語
ca, カタロニア語
kr, カヌリ語
kn, カンナダ語
km, カンボジア語
om, ガラ語
gl, ガリシア語
lg, ガンダ語
ki, キクユ語
ky, キルギス語
el, ギリシア語
kj, クゥニャマ語
cr, クリー語
ku, クルド語
hr, クロアチア語
gu, グジャラート語
kl, グリーンランド語
ka, グルジア語
gn, グワラニ語
qu, ケチュア語
xh, コサ語
kv, コミ語
co, コルシカ語
kg, コンゴ語
kw, コーンウォール語
sm, サモア語
sc, サルディニア語
sg, サンゴ語
sa, サンスクリット語
ss, シスワティ語
sn, ショナ語
sd, シンド語
si, シンハラ語
jv, ジャワ語
sv, スウェーデン語
gd, スコットランド・ゲール語
es, スペイン語
sk, スロバキア語
sl, スロベニア語
sw, スワヒリ語
su, スンダ語
zu, ズールー語
st, セソト語
sr, セルビア語
so, ソマリ語
th, タイ語
tl, タガログ語
tg, タジク語
tt, タタール語
ty, タヒチ語
ta, タミール語
cs, チェコ語
ce, チェチェン語
bo, チベット語
ch, チャモロ語
cv, チュヴァシュ語
za, チワン語
ts, ツォンガ語
tn, ツワナ語
ti, ティグリニア語
te, テルグ語
dv, ディベヒ語
da, デンマーク語
tw, トゥイ語
tk, トルクメン語
tr, トルコ語
to, トンガ語
de, ドイツ語
na, ナウル語
nv, ナバホ語
ny, ニャンジャ語
ne, ネパール語
no, ノルウェー語
nn, ノルウェー語 (ニューノルスク)
nb, ノルウェー語 (ボークモール)
ht, ハイチ語
ha, ハウサ語
hu, ハンガリー語
ba, バシキール語
eu, バスク語
bm, バンバラ語
ps, パシュトー語
pa, パンジャブ語
pi, パーリ語
ho, ヒリ・モツ語
hi, ヒンディー語
bi, ビスラマ語
bh, ビハール語
my, ビルマ語
fj, フィジー語
fi, フィンランド語
fo, フェロー語
fr, フランス語
ff, フラ語
fy, フリジア語
bg, ブルガリア語
br, ブルトン語
dz, ブータン語
oc, プロバンス語
he, ヘブライ語
iw, ヘブライ語
hz, ヘレロ語
vi, ベトナム語
bn, ベンガル語
ve, ベンダ語
fa, ペルシア語
bs, ボスニア語
vo, ボラピュク語
pt, ポルトガル語
pl, ポーランド語
mi, マオリ語
mk, マケドニア語
ms, マライ語
mg, マラガシー語
ml, マラヤーラム語
mr, マラーティー語
mt, マルタ語
gv, マン島語
mh, マーシャル語
mo, モルダビア語
mn, モンゴル語
yo, ヨルバ語
lo, ラオ語
la, ラテン語
lv, ラトビア語 (レット語)
lt, リトアニア語
ln, リンガラ語
li, リンブルグ語
lb, ルクセンブルク語
lu, ルバ語
rw, ルワンダ語
rn, ルンジ語
ro, ルーマニア語
rm, レト=ロマン語
ru, ロシア語
wa, ワロン語
ng, ンドンガ語
zh, 中国語
se, 北サミ語
nd, 北ンデベレ語
nr, 南ンデベレ語
ii, 四川語
ia, 国際語
ie, 国際語
cu, 教会スラブ語
ja, 日本語
be, 白ロシア語
en, 英語
ko, 韓国語