For e.g there is app which provides multi-language support, in my activity/UI, I call getResources().getString(R.string.hello)
which exist in strings.xml,such that
valuesstrings.xml
values-rustrings.xml
Now when calling getResources().getString(R.string.hello)
and need to access string based on system locale, so will one get strings from valuesstrings.xml
OR values-rustrings.xml
?
OR
does one need to change my app locale based on system locale (keep app locale same as system locale) and then retrieve the value from getString()
, something suggested in below links
I have searched various other links, but not able to find the solution
See Question&Answers more detail:os