MonoTouch 当前 UI 文化
当我更改模拟器或设备的语言时,此更改不会反映在 Thread.CurrentUICulture
和 CultureInfo.CurrentUICulture
中。这是设计使然吗?
When I change the Language of the emulator or the device this change is not reflected in neither Thread.CurrentUICulture
nor CultureInfo.CurrentUICulture
. Is this by design?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
目前,
CultureInfo
和NSLocale
之间还没有粘合剂。我不确定这两个(不同的列表)之间是否可以完全匹配,即使匹配,也会存在细微的差异,这可能会在移植代码时造成麻烦。然而,可能值得研究添加一个特定于 MonoTouch 的
CultureInfo
,它将使用当前的NSLocale
设置。如果您认为这可以解决您的问题,请填写错误报告(优先级增强)到 http://bugzilla.xamarin.com< /a> 因此可以优先考虑将来的版本。我必须进行类似的修复,以允许 .NET
TimeZoneInfo
在设备上正常工作(这将在 MonoTouch 5.2 和 5.1 beta 中提供)。Presently there is not glue between
CultureInfo
andNSLocale
. I'm not sure we can have an exact match between the two (different lists) and, even on match, there would be small subtle differences that could cause trouble when porting code.However it could be worth investigating adding a MonoTouch-specific
CultureInfo
that would use the currentNSLocale
settings. If you think this would solve your problem then please fill a bug report (priority Enhancement) to http://bugzilla.xamarin.com so it can be priorized for future releases.I had to make a similar fix to allow .NET
TimeZoneInfo
to work properly on devices (that will be available in MonoTouch 5.2 and 5.1 betas).