如何获得“区域和区域"语言"通过代码设置在WP7中?
问题描述:
是否可以通过API获得以下设置?
Is it possible to get following settings via the API?
- 一周的第一天
- 区域格式
- 显示语言
- 系统定位
答
您可以使用CultureInfo.CurrentCulture
和CultureInfo.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;