Many android applications have quite poor i18n-support, and for an understandable reason, as it adds much work for the developer. From a both intuitive and cultural point of view it would be a good thing if end-users could translate the apps themself, and OTA share the translation, without reinstalling the app itself. In concept; as wikipedia, some add content easily, others only use what's there. It's of course important that the service is as easy as possible to use, both for app-developers, and people willing to transcribe. To keep it simple, this is the solution I'm concidering; Developer perspective:
User perspective:
Translator perspective:
QUESTION: Now, for this to work efficiently, it has to be AeasyAP for the developer to even bother, and the most fluent solution would be a customized version of setContentView, that simply loads the translated values from external xml, instead of the ones in the apk. Is this possible at all, and if not, what's your suggested solutions? (And of course, Happy New Year, feliz ano novo, blwyddyn newydd dda, Gott Nytt År, kontan ane nouvo, szczęśliwego nowego roku ...) Regards, /T | ||
| |
up vote
0
down vote
|
Yes, it's possible only if someone (probably you or me or others) will rewritesetContentView()- since I see root of a problem only there. Let me explain:
How to do that? 2 options:
EDIT1: You can override it like:
| ||||||||||
|
|
up vote
0
down vote
|
Regarding the second part of the question, it is possible to use an existing translation service like Launchpad, which operates on .po files for gettext. There is however android2po, which can transform between Android's XML and the gettext .po format. There are already some Android translations on Launchpad, e.g. ConnectBot, however the service requires a login to be able to contribute. Alternatively, you should look at the available gettext-based web translator suites you can run yourself as well, like Pootle. Sorry, I am not allowed to post more than one URL. Please google the rest up :( | ||
|
|
up vote
0
down vote
accepted
|
layoutinflator.factory is what I was looking for... |