I want to add some html files in different languages in my application for supporting my application for different languages. I have done with string.xml file but now i want to add html pages on web view according to device language. How can i do this?
Thanks in advance
Lets say you want to store your HTML files in
/res/string, then you can use language qualifiers to specify for which language the resources is meant, like/res/string-enor/res/string-nl(for English respectively Dutch files).Same goes for all other resource types, like
/res/drawable,/res/raw/, etc.For more information checkout the Android Localization pages.
To load the HTML from a string and show it in your
WebViewuse theloadData()method: