5

Is it possible to configure android.app.DatePickerDialog so that it is localized for the European format easily (exchange day and month and exchange the english button names with localized ones) ?

georam
  • 494
  • 2
  • 5
  • 14

2 Answers2

4

The DatePickerDialog is localized by default. I tried it on a real device and the localization of the dialog adapts to the system default.

georam
  • 494
  • 2
  • 5
  • 14
  • Additional information for application locale you can find [here](http://stackoverflow.com/questions/21257014/set-language-to-french-in-android-datepickerdialog) – Igor K Aug 25 '14 at 13:28
0

You could design 2 DatePickerDialogs and use a condition based on the Locale class to choose between one or the other. However, as there is no "Europe" locale, but only countries locales, you might need to put the european locales in a list, and check if the locale is in the list. The current locale of the phone is accessed with : Locale.getDefault()

Sephy
  • 50,022
  • 30
  • 123
  • 131
  • 1
    But the android.app.DatePickerDialog has no option to localize it to another format, or do i oversee it ? Do i have to rewrite it on my own ? – georam Jul 27 '10 at 16:01
  • I don't know a lot about this kind of dialog, but I think you do have to rewrite your own. – Sephy Jul 27 '10 at 16:10