如何获得"地区&语言"通过代码在 WP7 中设置? [英] How to get "region & language" settings in WP7 via code?

查看:13
本文介绍了如何获得"地区&语言"通过代码在 WP7 中设置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以通过 API 获取以下设置?

Is it possible to get following settings via the API?

  • 一周的第一天
  • 区域格式
  • 显示语言
  • 系统定位

推荐答案

您可以分别使用 CultureInfo.CurrentCultureCultureInfo.CurrentUICulture 来查找系统文化和语言设置.其余的信息(一周的第一天等)都在那里,我相信 - 例如:

You can use CultureInfo.CurrentCulture and CultureInfo.CurrentUICulture to find the system culture and language settings respectively. The rest of the information (first day of week etc) is within there, I believe - for example:

DayOfWeek firstDayOfWeek = CultureInfo.CurrentCulture
                                      .DateTimeFormat
                                      .FirstDayOfWeek;

这篇关于如何获得"地区&语言"通过代码在 WP7 中设置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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