Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 582
Srinivas Avatar asked Dec 28 '22 08:12

Srinivas


1 Answers

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

like image 100
CommonsWare Avatar answered Jan 05 '23 05:01

CommonsWare