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
get-string-from-default-locale-using-string-in-specific-locale
how-to-get-string-from-different-locales-in-android
I have searched various other links, but not able to find the solution
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…