Set default Locale to DatePicker and TimePicker
You need to create your custom DatePicker or TimePicker
.
See this link https://stackoverflow.com/a/9220899/3864698. It can help you to solve your problem.
Or you can use Reflection to edit the NumberPicker values, follow this link for the complete solution.
DatePickerDialog in arabic language
I found the answer is to change the "Locale" of the whole app to "ar"
At your starting activity set your application Locale to "ar" by below code and all views and dialogs will be switched to Arabic.
Locale locale = new Locale("ar");
Locale.setDefault(locale);
Configuration config =
getBaseContext().getResources().getConfiguration();
config.setLocale(locale);
createConfigurationContext(config);
How to change language in datepicker?
change here
days: ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag", "Sonntag"],
daysShort: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa", "So"],
daysMin: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa", "So"],
TO
days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sonntag"],
daysShort: ["Sun", "Mon", "Tue", "Wed", "Thr", "Fri", "Sat"],
daysMin: ["Sun", "Mon", "Tue", "Wed", "Thr", "Fri", "Sat"],
Related Topics
Android - Taking Photos and Saving Them with a Custom Name to a Custom Destination via Intent
Nexus 5X Reverse Landscape Sensor Fix in a Android Camera Preview App
How to Display Gif in React-Native Android App
The Import Android.Support.V7.App Cannot Be Resolved
Picasso Loading of Image Spawned Inside Asynctask
Pass Arraylist Data into Soap Web Service in Android
I Want My Android Application to Be Only Run in Portrait Mode
How to Scroll to Top of Long Scrollview Layout
How to Remove the Title Text from the Android Actionbar
How to Change Letter Spacing in a Textview
Cli on Dalvikvm Fails on Jni Lib
Wallpaper Not Properly Fit on Device Screen
Elevation on Android Lollipop Not Working
Bufferoverflowexception When Building Application
Getactionview() of My Menuitem Return Null
Android Home Screen Widget (Icon, Label - Style)
Multiple Table SQLite Db Adapter(S) in Android
Android: What Is Better - Multiple Activities or Switching Views Manually