Java根据国家⼆字码获取国家英⽂名称,中⽂名称实例import org.apachemons.lang.StringUtils;
public class CountryUtil {
/**
* 根据国家⼆字码获取国家对应的中⽂(英⽂,code)
*
* @param countryCode
* @return
* @author Henry(fba02)
* @version [版本号, 2019年1⽉17⽇]
* @see [类、类#⽅法、类#成员]
*/
public static String getCountryNameCnEnCodeByCountryCode(String countryCode) {
String countryName = null;
switch (countryCode) {
case "US":
countryName = "美国(United State,US)";
break;
case "GB":
countryName = "英国(United Kingdom,GB)";
break;
case "DE":
countryName = "德国(Germany,DE)";
break;
case "CA":
countryName = "加拿⼤(Canada,CA)";
break;
case "JP":
countryName = "⽇本(Japan,JP)";
break;
case "ES":
countryName = "西班⽛(Spain,ES)";
break;
case "FR":
countryName = "法国(France,FR)";
break;
case "IT":
countryName = "意⼤利(Italy,IT)";
break;
case "CN":
countryName = "中国(China,CN)";
break;
case "AT":
countryName = "奥地利(Austria,AT)";
break;
case "AU":
countryName = "澳⼤利亚(Australian,AU)";
break;
case "CH":
countryName = "瑞⼠(Switzerland,CH)";
break;
case "EG":
countryName = "埃及(Egypt,EG)";
break;
case "FI":
countryName = "芬兰(Finland,FI)";
break;
countryName = "爱尔兰(Ireland,IE)";
break;
case "ID":
countryName = "印度尼西亚(Indonesia,ID)";
break;
case "KH":
countryName = "柬埔寨(Cambodia,KH)";
break;
case "KR":
countryName = "韩国(Korea,KR)";
break;
case "MX":
countryName = "墨西哥(Mexico,MX)";
break;
case "NL":
countryName = "荷兰(Holland,NL)";
break;
case "NO":
countryName = "挪威(Norway,NO)";
break;
case "MM":
countryName = "缅甸(Burma,MM)";
break;
case "PH":
countryName = "菲律宾(Philippines,PH)";
break;
case "BE":
countryName = "⽐利时(Belgium,BE)";
break;
case "GY":
countryName = "圭亚那(Guyana,GY)";
break;
case "SE":
countryName = "瑞典(Sweden,SE)";
break;
case "PY":
countryName = "巴拉圭(Paraguay,PY)";
break;
case "UA":
countryName = "乌克兰(Ukraine,UA)";
break;
case "PE":
countryName = "秘鲁(Peru,PE)";
break;
case "AE":
countryName = "阿联酋(United Arab Emirates,AE)";                break;
case "VN":
countryName = "越南(Vietnam,VN)";
break;
case "SO":
countryName = "索马⾥(Somalia,SO)";
break;
case "LA":
countryName = "⽼挝(Laos,LA)";
break;
case "KW":
countryName = "科威特(Kuwait,KW)";
break;
case "MY":
countryName = "马来西亚(Malaysia,MY)";
case "PK":
countryName = "巴基斯坦(Pakistan,PK)";
break;
case "TH":
countryName = "泰国(Thailand,TH)";
break;
case "HU":
countryName = "匈⽛利(HUNGARY,HU)";
break;
case "LV":
countryName = "拉脱维亚(Latvia,LV)";
break;
case "RU":
countryName = "俄罗斯(Russia,RU)";
break;
case "CZ":
countryName = "捷克(Czech Republic,CZ)";
break;
case "PL":
countryName = "波兰(Poland,PL)";
break;
case "BY":
countryName = "⽩俄罗斯(Belarus,BY)";
break;
case "LT":
countryName = "⽴陶宛(Lithuania,LT)";
break;
case "LU":
countryName = "卢森堡(Luxembourg,LU)";
break;
case "AD":
countryName = "安道尔(Andorra,AD)";
break;
case "AG":
countryName = "安提⽠(Antigua and Barbuda,AG)";
break;
case "RO":
countryName = "罗马尼亚(Romania,RO)";
break;
case "AM":
countryName = "亚美尼亚(Armenia,AM)";
break;
case "CV":
countryName = "佛得⾓(Cape Verde,CV)";
break;
case "DZ":
countryName = "阿尔及利亚(Algeria,DZ)";
break;
case "RT":
countryName = "罗塔岛(北马⾥亚纳岛)(Rota(Northern Mariana Islands),RT)";                break;
case "TL":
countryName = "东帝汶(Timor-Leste,TL)";
break;
case "MU":
countryName = "⽑⾥求斯(Mauritius,MU)";
break;
case "ZM":
countryName = "赞⽐亚(Zambia,ZM)";
break;
case "BL":
countryName = "圣马丁(⽠德罗普岛)(St. Maarten,St. Martin,SX)";                break;
case "BH":
countryName = "巴林(Bahrain,BH)";
java switch case stringbreak;
case "GM":
countryName = "冈⽐亚(Gambia,GM)";
break;
case "MV":
countryName = "马尔代夫(Maldives,MV)";
break;
case "CK":
countryName = "库克岛(Cook Islands,CK)";
break;
case "RE":
countryName = "留尼汪岛(Reunion Island,RE)";
break;
case "IQ":
countryName = "伊拉克(Iraq,IQ)";
break;
case "GD":
countryName = "格林纳达(Grenada,GD)";
break;
case "FM":
countryName = "密克罗尼西亚(Micronesia,Federated States of,FM)";                break;
case "VE":
countryName = "委内瑞拉(Venezuela,VE)";
break;
case "NC":
countryName = "新喀⾥多尼亚(New Caledonia,NC)";
break;
case "NP":
countryName = "尼泊尔(Nepal,NP)";
break;
case "MD":
countryName = "摩尔多⽡共和国(Moldova,MD)";
break;
case "VA":
countryName = "梵蒂冈(Vatican City(Italy),VA)";
break;
case "GP":
countryName = "⽠德罗普岛(Guadeloupe,GP)";
break;
case "GU":
countryName = "关岛(Guam,GU)";
break;
case "NA":
countryName = "纳⽶⽐亚(Namibia,NA)";
break;
case "QA":
countryName = "卡塔尔(Qatar,QA)";
break;
case "YT":
countryName = "马约特岛岛(Mayotte,YT)";
break;
case "ME":
countryName = "⿊⼭(Montenegro,ME)";
break;
case "BT":
countryName = "不丹(Bhutan,BT)";
break;
countryName = "⽡利斯岛和富图纳岛(Wallis & Futuna Islands,WF)";                break;
case "JO":
countryName = "约旦(Jordan,JO)";
break;
case "MK":
countryName = "马其顿(Macedonia(FYROM),MK)";
break;
case "BF":
countryName = "布基纳法索(Burkina Faso,BF)";
break;
case "NE":
countryName = "尼⽇尔(Niger,NE)";
break;
case "WL":
countryName = "威尔⼠(英国)(Wales(United Kingdom),WL)";
break;
case "GE":
countryName = "格鲁吉亚(Georgia,GE)";
break;
case "IS":
countryName = "冰岛(Iceland,IS)";
break;
case "ER":
countryName = "厄⽴特⾥亚(Eritrea,ER)";
break;
case "KM":
countryName = "科摩罗(Comoros,KM)";
break;
case "SN":
countryName = "塞内加尔(Senegal,SN)";
break;
case "EE":
countryName = "爱沙尼亚(Estonia,EE)";
break;
case "MO":
countryName = "澳门(Macau,MO)";
break;
case "SI":
countryName = "斯洛⽂尼亚(Slovenia,SI)";
break;
case "UG":
countryName = "乌⼲达(Uganda,UG)";
break;
case "ZW":
countryName = "津巴布韦(Zimbabwe,ZW)";
break;
case "TD":
countryName = "乍得(Chad,TD)";
break;
case "GL":
countryName = "格陵兰岛(Greenland,GL)";
break;
case "AF":
countryName = "阿富汗(Afghanistan,AF)";
break;
case "CD":
countryName = "刚果⼈民共和国(Congo,Democratic Republic of,CD)";                break;
case "MN":
countryName = "蒙古(Mongolia,MN)";

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。