import org.apache.commons.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;
case "IN":
countryName = "印度(India,IN)";
break;
case "IE":
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)";
break;
case "DK":
countryName = "丹麦(Denmark,DK)";
break;
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":
countr
Java根据国家二字码获取国家英文名称,中文名称实例
最新推荐文章于 2024-07-12 11:17:16 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)