How to get “region & language” settings in WP7 via

2019-02-12 11:05发布

问题:

Is it possible to get following settings via the API?

  • First day of week
  • Region format
  • Display language
  • System locate

回答1:

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;