简体   繁体   中英

Android Library to Support Indian Languages

I am writing an app in which I have to support all Indian languages and for that I am looking for some third party library (free or paid)

I googled many times for the same but I did not get any decent option (library)

I just got use strings.xml for (English, Hindi) in their respective folders.

But I have seen in Whatsapp there is a multilanguage option, which supports almost all major indian languages

For an Example : If I do select Hindi language, so it translates complete app in Hindi language only

Same kind of functionality, I need in my app, like in drop down, If user do tap on any of the Indian language, my app has to converted in same one only (Like: Hindi, Telugu, Marathi, Gujarati and others)

What would be the best way of doing this and getting it done?

It depends what do you mean by "support" Android supports all Indic languages. But it is not localized in all them. Because of that, some of them cannot be selected from Settings.

But if you can provide string.xml files for all of them, and put them in the proper values-xy folder.

Possible problems:

  1. How to select a language that the OS does not support? Have your own language selection. Once a locale is selected, call Locale.setDefault (to change the formatters), and change the resource loading configuration ( Set Locale programmatically )
  2. You see squares. This means missing fonts. Android has fonts for all the Indic scripts. But older phones might miss some. And OEMs might remove some to reduce size. So you can embed the proper Noto fonts in your application and use them ( https://www.google.com/get/noto/ ). Use styles, and have language specific style sheets.
  3. Keyboard missing. Install one. Here is the Google one: https://play.google.com/store/apps/details?id=com.google.android.apps.inputmethod.hindi . But there are also third party ones, for instance https://play.google.com/store/apps/details?id=org.smc.inputmethod.indic

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM