CultureInfo and RegionInfo Basics
RadDateOnlyPicker provides full support for the System.Globalization Namespace. This namespace consists of classes (CompareInfo, CultureInfo, RegionInfo, etc.) which contain culture-related information, such as the language, country/region, calendars in use, format patterns for dates, currency, and numbers, and the sort order for strings. They are useful classes for writing internationalized applications.
Two of the most important classes in this namespace are: CultureInfo and RegionInfo.
CultureInfo
Represents information about a specific culture including the names of the culture, the writing system, and the calendar used, as well as access to culture-specific objects that provide information for common operations, such as formatting dates and sorting strings.
The culture names follow the RFC 1766 standard in the format "
The complete list of the predefined CultureInfo names and identifiers can be found in CultureInfo class and the classes in the System.Globalization namespace.
The table below is a sample list of the names and identifiers found in the CultureInfo class.
Culture Name | Culture Identifier | Language-Country/Region |
---|---|---|
bg-BG | 0x0402 | Bulgarian - Bulgaria |
en-GB | 0x0809 | English - United Kingdom |
fr-FR | 0x040C | French - France |
es-ES | 0x0C0A | Spanish - Spain |
ar-SA | 0x0401 | Arabic - Saudi Arabia |
fa-IR | 0x0429 | Farsi - Iran |
ps-AF | 0x0463 | Pashto - Afghanistan |
ar-SA | 0x0401 | Arabic - Saudi Arabia |
this.radDateOnlyPicker1.Culture = new System.Globalization.CultureInfo("ar-SA");
Me.RadDateOnlyPicker1.Culture = New System.Globalization.CultureInfo("ar-SA")
RegionInfo
The RegionInfo class contains information about the country/region. In contrast to CultureInfo, RegionInfo does not represent preferences of the user and does not depend on the user's language or culture. The RegionInfo name is one of the two-letter codes defined in ISO 3166 for country/region. Case is not significant; however, the Name, the TwoLetterISORegionName, and the ThreeLetterISORegionName properties return the appropriate code in uppercase.