How to set different locales in Android?

In my application, I need to display strings according to the user's locale. So, I put mine strings.xmlin values-en, values-koetc. How can I install locale us, australia ie; values-en_US, values-en_AU? But is that a mistake? Can someone tell me how to set these locales in my code?

+3
source share
3 answers

Use res/values-en-rUS/(replacing _with -r).

+10
source

I do not understand your question, but if you are not sure what name you need for a particular locale, refer to these links

http://developer.android.com/intl/de/reference/java/util/Locale.html

http://groups.google.com/group/android-developers/web/localizing-android-apps-draft

Android , /.

0

There is an international standard for Locale ..... for example, values-en for English .... values-ko for Korean ... You cannot change the standard. It will work if you save the folder name as -ko values.

0
source

Source: https://habr.com/ru/post/1762259/


All Articles