40.3. Satellite Resources

One of the big advantages of placing data in a resource file is the resulting capability to translate the data for foreign cultures. Instead of all the languages being included in a single resource file, each culture's data is stored in a resource file that has a suffix defined by that culture.

40.3.1. Cultures

Cultures are defined by a combination of two lowercase letters, which represent the language, and two uppercase letters, which represent the country or region of the culture. These two pairs of letters are separated by a hyphen. For example, U.S. English and Australian English are represented as en-US and en-AU respectively. The corresponding resource files for these cultures would be MyResource.en-US.resx and MyResource.en-AU.resx. A full list of culture identifiers can be found at http://msdn2.microsoft.com/en-us/library/system.globalization.cultureinfo.aspx. If you are curious, you can look over all the available cultures, which are returned by CultureInfo.GetCultures(CultureTypes.AllCultures). There are about 220 of them, and they can be classified as follows:

  • Invariant culture: No language or country identifier (for example, Form1.resx). Data is not dependent upon culture. For example, this might be the company logo, which will not vary and is not dependent upon culture information.

  • Neutral culture: Language identifier (for example, Form1.en.resx). Data is dependent upon language alone — for example, a simple warning message that merely needs ...

Get Professional Visual Studio® 2008 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.