I have a WSP package that contains some features.
I need to be able to localize the following in the features:
- Site Column Field Display Names
- Description of Co开发者_开发技巧ntent Types
- List Instance Description
- 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!
精彩评论