Reputation: 4122
When you print all the available locales in android using this code
Locale[] locales = Locale.getAvailableLocales();
you will find locales that you can not select them from Settings -> Language & Input ->Language .
For example from the settings you will find only 5 English locales
While the available the number of the supported locales in the previous code is much bigger. for example :
09-14 16:03:04.835 12432-12720/com.q.sampleapp I/locale: en-cc
09-14 16:03:04.835 12432-12720/com.q.sampleapp I/locale: en-ck
09-14 16:03:04.835 12432-12720/com.q.sampleapp I/locale: en-cm
09-14 16:03:04.835 12432-12720/com.q.sampleapp I/locale: en-cx
09-14 16:03:04.835 12432-12720/com.q.sampleapp I/locale: en-dg
09-14 16:03:04.835 12432-12720/com.q.sampleapp I/locale: en-dm
09-14 16:03:04.835 12432-12720/com.q.sampleapp I/locale: en-er
09-14 16:03:04.835 12432-12720/com.q.sampleapp I/locale: en-fj
09-14 16:03:04.835 12432-12720/com.q.sampleapp I/locale: en-fk
09-14 16:03:04.835 12432-12720/com.q.sampleapp I/locale: en-fm
09-14 16:03:04.836 12432-12720/com.q.sampleapp I/locale: en-gb
09-14 16:03:04.836 12432-12720/com.q.sampleapp I/locale: en-gd
09-14 16:03:04.836 12432-12720/com.q.sampleapp I/locale: en-gg
09-14 16:03:04.836 12432-12720/com.q.sampleapp I/locale: en-gh
09-14 16:03:04.836 12432-12720/com.q.sampleapp I/locale: en-gi
09-14 16:03:04.836 12432-12720/com.q.sampleapp I/locale: en-gm
09-14 16:03:04.836 12432-12720/com.q.sampleapp I/locale: en-gu
09-14 16:03:04.836 12432-12720/com.q.sampleapp I/locale: en-gy
09-14 16:03:04.836 12432-12720/com.q.sampleapp I/locale: en-hk
09-14 16:03:04.836 12432-12720/com.q.sampleapp I/locale: en-ie
09-14 16:03:04.836 12432-12720/com.q.sampleapp I/locale: en-im
So the question is why they are not identical ? and How to change that list in the setting -> language & input.
Thanks in advance.
Upvotes: 2
Views: 143
Reputation: 52622
Supporting a language requires more than just requiring the locale. You have one list of supported languages and one list of supported locales. You can't expect them to be identical. On the other hand, since you can have more than one locale for a language, you will have fewer languages as well.
Upvotes: 1