Delen via


How to: Create a Localized Version of a Resource File

If you localize your project, you will want to create localized versions of the project resource file. For example, strings are the most common type of resource to be localized. The localized files are not displayed in the Resource Designer, but you can create and view them in Solution Explorer.

To create a localized resource file

  1. Create a resource file named Resources.resx. In Visual Basic, for the default .resx file, you need to click the Show All Files button in order to view and access the .resx file.

  2. In Solution Explorer, right-click the project, point to Add, and then click New Item.

  3. In the Add New Item dialog box, select Resources File and name the file Resources.de-DE.resx. The file name indicates the language, German, and the country, Germany. For more information about culture names and identifiers, see CultureInfo.

    Resources.de-DE.resx will appear in Solution Explorer, and a Resource Designer for the file will appear.

  4. Open the Resource Designer. On the Project menu, click Properties. In the Project Designer, click the Resources tab.

  5. In the Resource Designer, add a string in German. For example, you can use the first line of Goethe's "Wanderers Nachtlied":

    Über allen Gipfeln ist Ruh.

    ("Over all the peaks is silence")

  6. On the Build menu, click Build Solution.

  7. Visual Studio will automatically create satellite assemblies for each language you specify in this manner. The assembly ProjectName.resources.dll is created in ProjectName\bin\Release\de-DE. Additional satellite assemblies will be created in appropriate locale directories under ProjectName\bin\Release. You need to deploy the assembly files for the localized version of the application to work.

See Also

Concepts

Hierarchical Organization of Resources for Localization

Reference

CultureInfo