Merry Meal Merry Meal - 1 month ago 23
Android Question

Android app localization with sqlite db

Well, i have an android app created in delphi xe7. And i use sqlite data base to store all text there (use it for windows application and android version).

During the first start the program asks user to choose language and then it downloads language data base and some resources from program site. Also user can change language in run time.

But when I've added different language description on google play, it noted me, that my apk file is not localized.
How could I solve this problem?

Answer

The problem because Google expects you to create different folders inside your res/ folder for each languge that your app supports.

For example if you have french there should be a file called res/values-fr/strings.xml and if you support spanish there should be a file called res/values-es/strings.xml

This link http://developer.android.com/training/basics/supporting-devices/languages.html explains more.

All is not lost. You can easily write a few lines of code to read your sqlite database and convert those strings into strings.xml files that will keep google happy.