共用方式為


SPWeb.UserResources Property

Gets the collection of user-defined localized resources scoped to the current website.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public ReadOnly Property UserResources As SPUserResourceCollection
    Get
'Usage
Dim instance As SPWeb
Dim value As SPUserResourceCollection

value = instance.UserResources
public SPUserResourceCollection UserResources { get; }

Property Value

Type: Microsoft.SharePoint.SPUserResourceCollection
A collection of SPUserResource objects that contain user-defined localizable resources.

Remarks

The collection returned by this property is empty (Count equals 0) if none of the display text associated with the website has been customized. If the collection is not empty, then it contains SPUserResource objects that have localizable resources used by the website as well as by content types, navigation nodes, and user custom actions associated with the website.

You can call the ExportUserResources method to export all user resources for a website, including user resources for lists in the site, to a resource file for each of the languages supported by the site. You can then give these files to someone who can translate the strings that they contain. When this work is complete, you can call ImportUserResources to import the translations, making them available to the multilingual user interface.

See Also

Reference

SPWeb Class

SPWeb Members

Microsoft.SharePoint Namespace

ExportUserResources(CultureInfo, Boolean, Stream)

ImportUserResources(CultureInfo, Stream)

DescriptionResource

TitleResource

SPContentType.DescriptionResource

SPContentType.NameResource

SPNavigationNode.TitleResource

SPUserCustomAction.CommandUIExtensionResource

SPUserCustomAction.DescriptionResource

SPUserCustomAction.TitleResource

Other Resources

Understanding the Multilingual User Interface (MUI)