Android判断当前系统语言
16lz
2021-12-04
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")
效果图
- 中文
- 英文
更多相关文章
- Android(安卓)Studio编译失败:Error: Invoke-customs are only su
- android 自定义progressbar 样式
- android 语言简写对应表
- AS中一个报错解决:LoggedErrorException: Failed to run command
- android朗读英文
- TextView英文自动换行解决方法
- Android强制为自身应用设置实现多语言
- ProgressBar使用详解(进度条动画)
- Android(安卓)C 语言读取系统属性