I have an application that gives the user the right to choose an item from array in string.xml:
<array-string name="countries">
<item>USA</item>
<item>UK</item>
</array-string>
and another array in the translated-to-Chinese string.xml:
<array-string name="countries">
<item>美国</item>
<item>联合王国</item>
</array-string>
For example, the app has two TextViews
, I want the user to select a certain country in Chinese, the first TextView
shows the value in Chinese & the second shows its value in English (from default string.xml).
I hope my intent is clear.
If you have various res folders for different locales, you can do something like this:
If your min sdk > 17 try this