Skip to Main Content
Professional Visual Studio® 2008
book

Professional Visual Studio® 2008

by Nick Randolph, David Gardner
July 2008
Intermediate to advanced content levelIntermediate to advanced
1026 pages
27h 59m
English
Wrox
Content preview from Professional Visual Studio® 2008

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Professional Visual Studio® 2010

Professional Visual Studio® 2010

Nick Randolph, David Gardner, Michael Minutillo, Chris Anderson

Publisher Resources

ISBN: 9780470229880Purchase book