Edit translation text at runtime from server

239 Views Asked by At

Overview

AFAIK on Android you have twi ways to set the texts of your application:

  • You can use string.xml with different locales
  • You can download strings from server and set every label with a setText(language.text) but it will be a pain

The problem might sussist if you have to change a text of your published application without re-publishing it; for example if you want to change for a specific translation a small text without any functionality change. (ie: you might notice that you wrote "Take picure" instead of "Take picture").

Library

i18next is a good library to manage translations dinamically from server, but you still have to add the text for each label you got.

So, my question is

Still AFAIK, there is no way to do it natively, but is there a low level library or a workaround that allows to replace a string in your string.xml with some downloaded text?

Another option could be to make our label text to point instead of at @string/myValue to something like @myresource.pathtovalue.

Honestly I think this could be an huge improvement for application, is there something useful?

0

There are 0 best solutions below