Sunday, July 10, 2011

How to find available locales in Andoid

In Java the usual approach to find the available Locales on a System is to use:


This will return a pretty large number of Locales. Another approach is to use the AssetManager:


This will return the Locales that the AssetManager contains data for, which is typucally a lot less than what Locale.getAvailableLocales()
returns. It probably makes more sense only to use these Locales in an Applications.