You can use strings in this way: " R.string.*" or in xml: "android:text=@strings/*" – right?
They all take their values out of a fixed file named strings where you put them all in right?
Let’s say I have an app where there is the possibility to change language. Is there a way in which I can change that string file? Let’s say have a strings file for English and strings for French or anything.. so i can still use the R.string.* and @string/* but I will get different values depends on the user choice?
The Developer’s Guide on Localization covers this.
In short use the same string names, but have different locale folders, like:
res/values/strings.xmlfor the default languageres/values-fr/strings.xmlfor Frenchres/values-ja/strings.xmlfor JapaneseThe OS will load the appropriate language for
R.string.hellofor you.