I understand this is a FAQ but after googling for hours and finding nothing but forum questions with no answers and a heap of bad (non-functional) advice, I figured I'd ask.
I'd like to allow our users to set a locale independent of the system-wide one. To construct the menu of available languages, I figured I'd take a list of languages supported by the app and remove the ones not supported by the particular device. I wouldn't want to offer a language to the user if the device cannot render texts in that language (say due to a missing font or code support). Getting a list of languages device can render turned out surprisingly hard though. Following hints from docs and advice from the net, I tried Locale.getAvailableLocales() Resources.getSystem().getAssets().getLocales() (or just getAssets().getLocales() with same result) none of which gets the expected result (which is something resembling the language list in system "Language & Input" settings). Also, there is a mention in the docs that subsystems affected by locale settings usually offer their own means of getting a list of supported locales which we should use in preference to Locale.getAvailableLocales(). Fair enough but I can see no such functions in TextView or Paint which are the subsystems I use to draw text. We can do without app-specific locale settings although they'd be nice to have. However, if just out of curiosity, I'm still wondering if it's really not possible on Android to get this seemingly fundamental piece of information? -- -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

