views:

116

answers:

2

What languages are supported by android for localization with their respective values folder name, the best link i could find was http://developer.android.com/reference/java/util/Locale.html

any body can help me with more languages what if we need to support more languages then listed above.

A: 

My app uses the following undocumented languages, and they work:

  • ca Catalan
  • el Greek
  • es Spanish
  • pl Polish
  • pt Prtuguese
  • ro Romanian
  • ru Russian
  • sv Swedish

Not a definitive answer, but I hope that gives an idea of what the others look like.

Nicolas Raoul
so using undocumented XX values will ensure properly localized app, right?
SoftReference
undocumented list is 91 locales so we can use it as normal?
SoftReference
A: 

Virtually any language defined by the Strings representing the language code (as specified by ISO 639-1) and (optionally) country (as defined by Alpha 2 representation of ISO 3166-1). You can specify only the language (i.e. "en") or the language used specifically in one area (i.e. "en","US"). You do not need to use the constants (though convenient) that come with Locale.

// This is to get spanish locale of Spain
Locale spanish = new Locale("es", "ES");

The problem is not only specifying the correct languages, but also assuring that the mobile phone supports literals/formatting for the indicated Locale. I.e. a mobile phone sold in Spain will support "es" and "es_ES", almost surely "en" and "en_US" too and probably "ca_ES", "ba_ES" and "gl_ES". It is not likely that it will support for example "es_AR" or "zh_CN". So I think that the answer to your question is "it depends on the market of your application".

Fernando Miguélez
i want to target above mentioned languages and yes i understand that those locales may not even be available, how ever the documented list is very limited unlike the undocumented which one can get from a simple snippet for(Locale temp :Locale.getAvailableLocales()){ Log.i(temp.getDisplayCountry() + " - " + temp.getDisplayLanguage() , temp.toString()); }
SoftReference
You should pay attention to that list returned by Locale.getAvailableLocales(), since those are the actually supported by your phone
Fernando Miguélez
thanks for the info, it is done now.
SoftReference