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) ?
A:
You could design 2 DatePickerDialog
s 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
2010-07-27 15:55:45
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 ?
Georg
2010-07-27 16:01:21
I don't know a lot about this kind of dialog, but I think you do have to rewrite your own.
Sephy
2010-07-27 16:10:00
A:
The DatePickerDialog is localized by default. I tried it on a real device and the localization of the dialog adapts to the system default.
Georg
2010-07-29 16:46:06
A:
In my app, I've language preferences, where user can select the language of the application s/he wants to view application in. Depending upon the language selected, is it possible to set locale of DatePickerDialog "programatically"?
Jay
2010-10-10 10:23:36