获取设备中的当前语言 [英] Get the current language in device

查看:21
本文介绍了获取设备中的当前语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们如何才能获得 Android 设备中选择的当前语言?

How can we get the current language selected in the Android device?

推荐答案

如果您想获取设备的所选语言,这可能会对您有所帮助:

If you want to get the selected language of your device, this might help you:

Locale.getDefault().getDisplayLanguage();

您可以使用 Locale.getDefault().getLanguage(); 获取常用语言代码(例如de"、en")

You can use Locale.getDefault().getLanguage(); to get the usual language code (e.g. "de", "en")

这篇关于获取设备中的当前语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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