user948620
user948620

Reputation:

Android add Language XML (strings.xml) in res folder at runtime

I have an android app which has 3 languages in res folder.

I want my app to add another language at runtime in res folder and not by adding string xml files and recompile them.

How can i achieve this? I've search alot in google and no luck.

Thanks alot!!

Upvotes: 3

Views: 1377

Answers (2)

user948620
user948620

Reputation:

I confirmed that this is not possible because all files in res folder are read-only

Upvotes: 1

rgrocha
rgrocha

Reputation: 1461

I'm facing the same problem and I will just get all strings from a (cached) remote file. The TextView text property will store an id and in the Activity.onCreate() method I'll programatically replace all TextViews.text strings with it's matched value from the current language file.

Upvotes: 0

Related Questions