Localization Android

前端 未结 3 1779
伪装坚强ぢ
伪装坚强ぢ 2020-12-09 19:45

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/jav

相关标签:
3条回答
  • 2020-12-09 20:32

    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.

    0 讨论(0)
  • 2020-12-09 20:34

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

    0 讨论(0)
  • 2020-12-09 20:45

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

    0 讨论(0)
提交回复
热议问题