开发者

SharePoint / WSS: How to localize a feature

I have a WSP package that contains some features.

I need to be able to localize the following in the features:

  1. Site Column Field Display Names
  2. Description of Co开发者_开发技巧ntent Types
  3. List Instance Description
  4. List Schema Fields

I am looking for a method to achieve all of this as easily as possible.


In short, create a Resources folder inside of your feature folder, then add a text file to it, name it Resources.en-US.txt rename the file from .txt to .resx.

I use this roundabout way because I don't want the .designer.cs file and i don't want the schema part in my resx file. Which is what you get when you add a normal Resources file.

Open the resx file using the xml editor (right click -> open with) and add your properties in the following format:

<root>
  <data name="ANYNAME">
    <value>Some value</value>
  </data>
  <data name="ANOTHERNAME">
    <value>Some value</value>
  </data>
</root>

now you can use $Resources:ANYNAME etc. in your feature.xml i.e.

<feature Title="$Resources:ANYNAME" Description="$Resources:ANOTHERNAME" />


I think its pretty easy- article describes it here: read more

I am using WSP Builder, So in my VS Project I created a Resources Subfolder, and I am hoping that the resources I add here will get deployed when the WSP Package is....

That's the theory, I will update this question if it works!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜