I have a arabic strings.xml file. I also have an English one.
In my settings activity, I want to be able to change the language used by the user. Like, is there a method like setStringResource(string.xml-ar)
?
I have a arabic strings.xml file. I also have an English one.
In my settings activity, I want to be able to change the language used by the user. Like, is there a method like setStringResource(string.xml-ar)
?
duplication of Load language specific string from resource? check this one out.
Of course you must use Locale.AR
or something like that for Arabic resource file.
Keep your language specific xml strings in the necessary directories under resources
And change the locale as required
String language = "en";
String country = "US";
Locale locale = new Locale(language , country);