Localization Android
Asked Answered
P

3

10

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.

Paleobiology answered 1/9, 2010 at 6:43 Comment(1)
I need to put in following languages any body can help me with Values-XX values for English we can use default German, French, Spanish, Italian, Danish, Finnish, Norwegian, Swedish English (UK) PortuguesePaleobiology
A
19

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

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

More generally, it should be the string in the "639-1" column of this table.

Assembly answered 1/9, 2010 at 7:4 Comment(3)
so using undocumented XX values will ensure properly localized app, right?Paleobiology
undocumented list is 91 locales so we can use it as normal?Paleobiology
Saved me. The intuition was making me put cat for catalan instead of ca (as ca sounds more things for Canada). And we were talking about languages, not geo-regions.Sensate
P
2

I suggest use the list of the ISO 639-1 standard

Phuongphycology answered 28/2, 2013 at 11:29 Comment(0)
F
0

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".

Farfamed answered 1/9, 2010 at 7:24 Comment(3)
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()); }Paleobiology
You should pay attention to that list returned by Locale.getAvailableLocales(), since those are the actually supported by your phoneEuropa
The important point is not that the device really supports the language, but that the language is listed in the device's settings so that you can choose it. You can use undocumented languages such as "eu" (Basque) but you won't be able to set your device's locale to Basque. Nevertheless, real "support" for this language is not necessary, you can just set the device's locale to "eu" with any adequate app and "support" will be there.Herwig

© 2022 - 2024 — McMap. All rights reserved.