得到的语言列表支持的Andr​​oid键盘 [英] getting list of languages supported by android keyboard

查看:147
本文介绍了得到的语言列表支持的Andr​​oid键盘的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要显示,其通过Android键盘支持的所有语言列表。现在,我使用 Locale.getAvailableLocales(); 的方法,但我得到的语言国家的常量。

我只需要所有的语言名称。可能吗?怎么样?

解决方案

如何使用<一个href="http://developer.android.com/reference/java/util/Locale.html#getDisplayName%28java.util.Locale%29"相对=nofollow> Locale.getDisplayName(区域)上的每个的区域,那么你得到与 Locale.getAvailableLocales();

  

返回此语言环境的语言名,国名和变量,本地化的语言环境。

     

新的区域设置(EN)getDisplayName(Locale.US) - >英语

I need to display the list of the all languages which are supported by android keyboard. Now I am using Locale.getAvailableLocales(); method but i am getting language and country constants.

I need all language names only. Is it possible? and how ?.

解决方案

How about using Locale.getDisplayName(Locale) on each Locale you get with Locale.getAvailableLocales();?

Returns this locale's language name, country name, and variant, localized to locale.

new Locale("en").getDisplayName(Locale.US) -> English

这篇关于得到的语言列表支持的Andr​​oid键盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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