Android获取当前系统语言

getResources().getConfiguration().locale.getCountry()

国际化常用语言

  • 中文:
getResources().getConfiguration().locale.getCountry().equals("CN")
  • 繁体中文:
getResources().getConfiguration().locale.getCountry().equals("TW") 
  • 英文(英式):
getResources().getConfiguration().locale.getCountry().equals("UK")
  • 英文(美式):
getResources().getConfiguration().locale.getCountry().equals("US")

效果图

  • 中文

  • 英文

更多相关文章

  1. Android(安卓)Studio编译失败:Error: Invoke-customs are only su
  2. android 自定义progressbar 样式
  3. android 语言简写对应表
  4. AS中一个报错解决:LoggedErrorException: Failed to run command
  5. android朗读英文
  6. TextView英文自动换行解决方法
  7. Android强制为自身应用设置实现多语言
  8. ProgressBar使用详解(进度条动画)
  9. Android(安卓)C 语言读取系统属性

随机推荐

  1. android RSA和Java RSA加密不一致的坑
  2. android配置X86虚拟机
  3. Android数字跑动效果NumberRunView 类似
  4. 睡眠唤醒机制简介
  5. 禁止android显示状态栏
  6. Android兼容android7.0、及Android8.0以
  7. android could not find adb.exe 如何解
  8. Android中文API(138) —— RemoteViews
  9. Android 4.0 SDK 已可下载
  10. android经典开源代码集合