How To Get The Script From A Locale Object On Android?
From what I see the Android Locale class doesn't mention anything about the script, only the language, country and variant. Whereas the Java SE Locale class mentions language, coun
Solution 1:
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:
Stringscript= LocaleUtilities.getScript(Locale.getDefault());
to get the script for the default locale.
Post a Comment for "How To Get The Script From A Locale Object On Android?"