我想通过资源文件设置网页部分的标题和说明。 我.webpart
文件中有这样的内容:从资源文件设置网页部分标题
<?xml version="1.0"?>
<webParts>
<webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
<metaData>
<type name="MyWebParts.MyWebPart" />
<importErrorMessage>Cannot import this web part.</importErrorMessage>
</metaData>
<data>
<properties>
<property name="Title" type="string">$Resources:MyWebPartResources,WebPartTitle</property>
<property name="Description" type="string">$Resources:MyWebPartResources,WebPartDescr</property>
</properties>
</data>
</webPart>
</webParts>
我已经把资源文件夹12\Resources
。
但是,对话似乎没有从资源文件中选取标题和描述。
有没有人解决这个问题?
更新-1: 在添加Web部件对话,我看到下面的,而不是在资源文件中的文本:
$Resources:MyWebPartResources,WebPartTitle
$Resources:MyWebPartResources,WebPartDescr
.resx文件的名称是什么?你的安装运行什么语言? 你读过这个吗? http://tomblog.insomniacminds.com/2008/02/25/sharepoint-internals-resources/ – anchorpoint
文件名是MyWebPartResources.resx。我会看看那个链接。 谢谢! – Vijay
根据这个链接,我应该是在其中一个资源文件, 1. \ 12 \ CONFIG \资源 2. C:\的Inetpub \ wwwroot的\ WSS \ VirtualDirectories \ \ App_GlobalResources文件\ 这两个地方都不加工。 引用资源输入的方式也是正确的: '$ Resources:MyWebPartResources,WebPartTitle' 对此有何评论? –
Vijay