How to get the script from a Locale object on Android?

拥有回忆 提交于 2019-12-01 08:51:11

This feature is not built into the Android SDK. Instead, I wrote a version you can use, available here. Basically, it takes the table in the above answer and ports it to a Map<String, Map<String, String>> containing the useful information, then a simple lookup method is used. To use this class in your project, just call:

String script = LocaleUtilities.getScript(Locale.getDefault());

to get the script for the default locale.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!