Using the CultureInfo Class
The CultureInfo class provides culture-specific information about the locale of the operating system running your application. To give you an idea of what the CultureInfo class does, you can look at your own computer's regional settings.In the Control Panel, the Regional and Language Settings applet is the place to view and change how regional information should be displayed on your computer. This includes date, time, currency, currency symbol information, as well as your keyboard layout.Figure 15.1 demonstrates the Regional and Language Settings dialog box for my computer.
Figure 15.1. Regional settings for English (United States).

Because I installed Windows XP and I live in Florida, the locale for my computer is English (United States). I could have changed this to whatever I wanted during installation of Windows XP, or I could go to the Control Panel and modify it. Because the locale is en-US, the standard date, time, and currency formats are used throughout Windows.If I want to see what the regional information would look like in another locale, I can change the settings to another locale in the Control Panel. Figure 15.2 shows I'm changing the locale to Tatar.
Figure 15.2. Modifying my locale to Tatar.

After the locale is changed, Windows takes on a new look for the regional settings of Tatar. If I look at my Outlook Calendar, it doesn't display the months and times as it would in the United Statesit displays them as it would for Tatar. Figure 15.3 shows Outlook after changing my locale to Tatar.
Figure 15.3. Outlook Calendar after changing the locale to Tatar.

As you can see, Outlook is written with globalization in mind. The dates and months aren't specific to any region; they're determined by the locale settings in the Control Panel. This is how you should write applications that can span the globe. The CultureInfo class gives you the flexibility to do this.In Windows and the .NET Framework's System.Globalization namespace, there are predefined culture names that comply with the RFC 1766 standard languagecode-Country/regioncode format for determining the culture you're working in. To make sense of this, look at the compact version of CultureInfo names and language-country/region combinations listed in Table 15.1.