3

How do I programmatically check which Locale is running currently on the device?

mrd
  • 4,561
  • 10
  • 54
  • 92

1 Answers1

6

Locale.getDefault().toString() or context.getResources().getConfiguration().locale.getDisplayName()

both will return strings

ACC
  • 2,488
  • 6
  • 35
  • 61
  • @Chanda: Will both return the same String? If not, what is the difference? – mrd May 03 '12 at 23:02
  • The would return the same string since `Locale.getDisplayName()` is the same as `Locale.getDisplayName(Locale.getDefault())`. Details here: http://developer.android.com/reference/java/util/Locale.html – ACC May 04 '12 at 07:11