Custom Culture Technology Sample

This sample shows how to create a custom culture by creating a new class that inherits from type CultureInfo. This custom culture can be used to specify formatting information (currency amount in this sample) and to retrieve resources from a satellite resource DLL or from a parallel assembly. This sample can be built only from the command line. It cannot be built using Visual Studio.

For information about using the samples, see the following topics:

To build the sample using the Command Prompt

  1. Open the Command Prompt window and navigate to one of the language-specific subdirectories for the sample.

  2. Type msbuild CustomCultureCS.sln or msbuild CustomCultureVB.sln, depending on your choice of programming language, at the command line. For example, to build the C# version of the application, type msbuild CustomCultureCS.sln at the command line.

To run the sample

  1. Navigate to the directory that contains the built executable file, using the command prompt or Windows Explorer.

  2. Type CustomCulture.exe at the command line, or double-click the icon for the executable file in Windows Explorer.

Requirements

.NET Framework Version: 2.0, 1.1, 1.0

Remarks

The new class overrides CultureInfo members to specify the currency format and to provide calling applications with resources specific to the custom class, such as the custom culture's Name property. For more information about implementing custom cultures, review comments in the source code files.

See Also

Reference

Assembly
CultureInfo
CurrentThread
LoadFrom
NumberFormatInfo
ResourceManager
StartupPath
System.Globalization
System.Threading

Concepts

Resource Localization
Localizability
Localization

Other Resources

Encoding and Localization