我可以本地化 UIDatePicker 吗? [英] Can I localize a UIDatePicker?

查看:19
本文介绍了我可以本地化 UIDatePicker 吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试本地化 UIDatePicker.Apple 的文档说它应该自动检测当前的语言环境,但无论我选择哪种语言,语言都保持不变.我该怎么办?

I'm trying to localize a UIDatePicker. Apple's docs say that it should autodetect the current locale, yet the language stays the same, no matter what language I select. What do I have to do?

推荐答案

locale 属性(以及所有其他国家/地区特定格式属性)默认为 currentLocale,其中反过来取决于 iphone 的国家/地区设置,而不是语言设置.需要在iphone通用设置中设置相应的国家.

The locale property (and all other country specific format properties for that matter) defaults to the value returned by currentLocale, which in turns depends on the iphone's country settings, not the language settings. You need to set the appropriate country in the iphone general settings.

这篇关于我可以本地化 UIDatePicker 吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆