如何在Android中分别获取应用程序语言和设备语言? [英] How to get application language and device language separately in android?

查看:138
本文介绍了如何在Android中分别获取应用程序语言和设备语言?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的设备语言是英语,而我的应用程序语言是意大利语.那么我如何以编程方式获得设备语言和应用程序语言?

My device language is in English and my application language is in Italian.So how I get the device language and application language programmatically ?

推荐答案

获取系统语言

Resources.getSystem().getConfiguration().locale.getLanguage();

获取应用语言

String CurrentLang = Locale.getDefault().getLanguage();

这篇关于如何在Android中分别获取应用程序语言和设备语言?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆