12

Is it possible to get following settings via the API?

  • First day of week
  • Region format
  • Display language
  • System locate
Maku
  • 389
  • 4
  • 15

1 Answers1

17

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;
Jon Skeet
  • 1,421,763
  • 867
  • 9,128
  • 9,194
  • 4
    A caveat: In some regions, Thread.CurrentThread.CurrentUICulture.Name may disagree with Thread.CurrentThread.CurrentUICulture.Name - in Australia, for example, UI culture returns en-GB despite my region being set to en-AU. – Peter Wone May 09 '11 at 13:17
  • 1
    @Peter: Thanks for that... interesting and disturbing :( – Jon Skeet May 09 '11 at 13:23