判断国家:

中文:getResources().getConfiguration().locale.getCountry().equals("CN")

繁体中文: getResources().getConfiguration().locale.getCountry().equals("TW") 

英文(英式):getResources().getConfiguration().locale.getCountry().equals("UK")

英文(美式):getResources().getConfiguration().locale.getCountry().equals("US")

 

如果不清楚当前国家的简写,可以直接System.out(getResources().getConfiguration().locale.getCountry());打印出来即可

 

下面是判断是否是中文或者繁体中文(台湾):



相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-13
  • 2021-10-01
猜你喜欢
  • 2022-12-23
  • 2021-05-19
  • 2021-11-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案