"Social" internationalization in the Android application - dynamic loading of resources

I have an idea to allow users to translate the application into their languages. I think so:

If the application is not translated into the user system language, the English version of the user interface is displayed, and the user is asked to ask for help in translation (this is obvious). Then the user is prompted to translate some phrases from English into his native language. And asked to check some other translations. (this is a bit of work, but nothing complicated) The hard part of my idea: The user clicks โ€œupdate translationโ€, and the text resources for this application are updated to the latest versions. Of course, you can make frequent updates, but this approach has some drawbacks: 1. I often have to do all these updates, and not all users will be happy with it. 2 Even if updates are performed weekly, the time from efforts to get results will be too long for most users, and the answer will probably not be as good as it can be.

Do you have any ideas on downloading on-line translations?

+4
source share
3 answers

Android does not currently support this. To accomplish what you want, you need to insert your own resource handling code to return strings wherever they are used in your user interface. This means that you could not allow yourself to load structure lines (for example, not using android: text = "@ string / something" in your layouts) and call your own function to get a line that wraps Resource.getString () / GetText ( )

And you will also have to deal with the fact that resource identifiers are unstable and can change with every build of your application.

So, you are looking at something completely non-trivial.

+1
source

I have done some internationalization using:

First I will check if they have some kind of api. If the API is missing, I would check the gettext implementation and process the translations with it.

+1
source

You can cache any of the current user translations in a file on SD / storage and show it to this specific user. Then, when it receives its weekly update, delete the cached file and start over?

0
source

All Articles