Globalization is the process of designing and developing applications that function for multiple cultures. Globalization focuses primarily on implementing culture-dependent functions, such as the date, number, and currency formatting.
Localization is the process of customizing an application for a given culture and locale. Localization consists primarily of translating the user interface.
ASP.NET provides the CultureInfo class, which encapsuates information for supported cultures, including the language, country/region, and cultural conventions associated with a specific culture, such as the writing system and calendar used for each culture.
This class also provides the information required for performing culture-specific operations, such as formatting dates and numbers and comparing and sorting strings.
The CultureInfo class specifies a unique name for each culture based on the RFC 1766 standard.
Culture names are in the format <languagecode2>-<country/regioncode2>
, where <languagecode2>
is a two-letter lowercase code associated with a language ( for example en for English ) and <country/regioncode2>
is a two-letter uppercase code associated with a country or region, or locale as it is referred to in the Windows API ( for example US for the United States and GB for Great Britain ).
The locale code follows the language code, separated by a dash ( - ); for example, en-US for English-United States, en-GB for English-Great Britain, or de-DE for German-Germany and de-AT for German-Austria.
The locale determines how dates, times, numbers, and currencies are formatted, how items are alphabetically sorted, and how strings are compared.
In cases where a two-letter language code is not available, the three-letter code derived from ISO 639-2 is used; for example, the three-letter code div is used for cultures that use the Dhivehi language. Some culture names have suffixes that specify the script; for example, -Cyrl specifies the Cyrillic script, -Latn specifies the Latin script.
Throughout this section, the terms neutral culture and specific culture are used.
- A neutral culture is a culture that is associated with a language but not with a country/region. A neutral culture is specified by only the two-digit lowercase language code. For example, fr specifies the neutral culture for French, and de specifies the neutral culture for German.
- A specific culture is a culture that is associated with a language and a country/region. A specific culture is identified by the language code followed by the two-digit uppercase locale code. For example, fr-FR specifies French in France and fr-CA specifies French in Canada.
The following table lists all the CultureInfo names predefined in the .NET framework.
NOTE: Not all international fonts and code pages may be available or supported in your system, hence some characters or symbols may not render correctly. You can optionally install supplemental language support using the Regional and Language Options in Control Panel.
Show me