Srinivas
Srinivas

Reputation: 1736

How to set different locales in android?

In my application, I need to display strings according to user locale selection. So, I put my strings.xml in values-en, values-ko, etc. How can I set locale us, australia i.e; values-en_US, values-en_AU? But it's throwing an error? Can any one tell me how to set these locales in my code?

Upvotes: 4

Views: 6841

Answers (3)

Rohan K
Rohan K

Reputation: 1618

There is International Standard for Locale.....like values-en for English....values-ko for Korean...You cant modify the standard..It would work if you keep the folder name as values-ko.

Upvotes: 0

DeRagan
DeRagan

Reputation: 22930

I am not clear with your question but if you are not sure as what name you need to for a specified 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 by default will take the resources from respective language that has been selected on the device/stimulator.

Upvotes: 0

CommonsWare
CommonsWare

Reputation: 1007584

Use res/values-en-rUS/ (replacing the _ with -r).

Upvotes: 10

Related Questions