Share via


How to: Add a Resource File

The commands for adding resource files is on the shortcut menu of the solution node and feature nodes in Solution Explorer. For more information, see Localizing SharePoint Solutions.

To add a global resource file to a SharePoint solution

  1. Load a Visual Studio SharePoint solution, click a SharePoint project node in Solution Explorer, and then click New Item on the Project menu.

  2. In the Add New Item dialog box, click Global Resources File and then click Add to display the Add Resource dialog box.

    Note

    The Global Resources File project item template appears only when a SharePoint project item is selected.

  3. In the Add Resource dialog box, select a culture for the resource file, such as English (United States). This adds a global resource file to your solution in the format, Resourcex**.culture.**resx, such as, Resource1.en-US.resx.

  4. The Resource Editor opens in Visual Studio. Add resources to the resource file.

To add a feature resource file to a SharePoint feature

  1. With the SharePoint solution loaded in Visual Studio, right-click the name of a feature under the Features node in Solution Explorer, and then click Add Feature Resource. This adds a resource file to the feature in the format, ResourceFileName**.culture.**resx, such as, Feature1.en-US.resx.

  2. The Resource Editor opens in Visual Studio. Add resources to the resource file.

See Also

Other Resources

Developing SharePoint Solutions