iOS - Change Language for UIDatePicker by locale

六眼飞鱼酱① 提交于 2019-12-01 11:49:30

Unfortunately, you cannot achieve this, not even with the calendar trick described by Martin Ulrich. I've struggled with the same problem myself and after a long research, I found out the bitter truth: the only way to change the localization of the UIDatePicker is to change the device's language.

If the user will have the app's language as Hebrew, everything will be alright. If not, there's nothing you can do, except maybe create your own date picker. Sorry

You can set the calendar property of the UIDatePicker to [NSCalendar currentCalendar]

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!