Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to localize Android DatePicker?

I put the DatePicker on my Activity. Everytime I launch my app I see english version of date in the DatePicker widget: Oct 15 2012. But I want to have a local version of date (russian) when I start my Activity. I've tried to define the locale before UI initialization. But it doesn't help. Is there any possibility to make it without extending DatePicker class?

like image 710
tatiasha Avatar asked Mar 11 '26 05:03

tatiasha


1 Answers

In fact there is no need to override this class. But when I started to do it, I found info about special method "reorderpickers" which is specially designed to localize datepicker (automatically). My mistake was in setting Locale to English in the previous activity (to define English locale for password). That's why the standard method didn't work. So anybody who has the same problem check your code whether you have changed Locale.

like image 166
tatiasha Avatar answered Mar 12 '26 19:03

tatiasha



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!