I have application with internet access and don't want to store many string.xml
files for different languages.
What I want:
string.xml
with english strings. The question is how to change existing or add new string.xml
file in runtime?
You obviously cannot change, download or remove strings.xml
at runtime
If you want to store locations, you will have to use SQLite storage to store translations.
similar:
How to modify strings.xml file at runtime
run time modification of strings.xml
Now I can see only solution:
string.xml
or downloaded resource)getString()
and getText()
to your own method getStringFromLocalization
TextView
, Button
and some other views with custom one and change there init and setText
methods.Overriding the standered resource/language using resource files which are complied time then your scarifying performance over customization. Do it only if u need this.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.