I have a UIDatePicker
, that shows date and time UIDatePickerMode.dateAndTime
, when I present the picker while the language is Arabic, the picker is normally presented with hours on the left and minutes on the right with no issues as the below photo:
But if I change the language from English to Arabic, the picker switches the hours with the minutes as below:
I set the locale
based on user selected language as:
if CURRENT_LANGUAGE_IS_ARABIC == true{
pickerDate.locale = NSLocale.init(localeIdentifier: "ar") as Locale
}else{
pickerDate.locale = NSLocale.init(localeIdentifier: "en") as Locale
}
EDIT: Also when changing from Arabic to English the picker is showing the hours on the wrong place: