I want to make localization fully from a server, i...
# announcements
I want to make localization fully from a server, is it possible to load strings.xml from the server and substitute existing local strings.xml
No. Strings.xml must be known at compile-time and cannot be changed afterwards
You'll have to persist the response from the server and update the UI with the strings you've received
You can’t substitute existing local strings.xml. But you can create a manager class like StringsManager and access the strings from there instead from strings.xml. You can either store them in memory like HashMap or persist them in file/SharedPreferences. The solution you will pick depends on how big the strings list is.
This is what I am doing now, but I would like to find easier way, cause I have 300 lines of strings now))
I don't think this is K related, but anyway, try https://docs.lokalise.com/en/articles/3487109-lokalise-android-sdk-2-0-beta we're using it in our app for exactly this purpose
🔥 1
It seems what I am looking for, awesome🤩
Unfortunately, it's not what I wanted😬
You'll just have to keep in mind that it's only available on a paid plan, unless you are developing an open source app in which case it's free
Unfortunately, it's not what I wanted
what went wrong?
btw you may be interested in this https://stackoverflow.com/q/56892805/1916449
It want to pull the whole strings.xml file from a server. It means I will get translated strings already, as I understood lokalise changes language between local strings.xml files
However, lokalise also beneficial in case I will use local string files