How can I accept input in multiple languages ​​in android

I am working on an android application that will be used by possibly two sets of users. One will manage the application in English and will enter all the information in English. However, a set of users would like to record in Hindi.

Now my application can be displayed in both languages, having different sets of string.xml files and based on the language used on the phone or some settings in the application. But my application will have many forms in which the user must enter values, which can be in Hindi or in English. I am not sure how to handle this. The exact questions will be:

  • How to save data entered in Hindi in my database?
  • If somehow I just translate a word, there is a high probability of losing meaning. Is there any way to solve this?
  • I need to create reports based on these records, if they are in another language, how difficult will it be to insert them into the database?

I would appreciate some solid pointers if you don't have the time or energy to explain everything. Of course, some fundamental explanations are welcome.

+4
source share
1 answer

By default, TEXT fields in Android sqlite3 are stored as UTF-8. I understand that Hindi is encoded with UTF-8, and therefore English, so saving text in a particular language should not be a problem.

, . SO, : https://stackoverflow.com/questions/17056168/google-translate-or-similar-api-for-android

+1

Source: https://habr.com/ru/post/1540465/


All Articles