views:

75

answers:

2

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 Content Types
  3. List Instance Description
  4. List Schema Fields

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

A: 

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!

JL
+2  A: 

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" />
Colin
$Resources:MyResourceFileName,ANYNAME would be correct, if you don't set DefaultResourceFile...? Or not?
Janis Veinbergs
MyResourceFileName is only needed when you deploy to 12\Resources. When using feature related resources in a folder named resources in the feature folder, it is not needed.
Colin
What if you use the standard, visual studio resource files , will these work as well?
JL
I now you said you didn't want the standard resource files, but what is your motivation for not wanting them, personal preference, or will it simply not work that way?
JL
Whenb I tried they didn't work when i left the schema part in the .resx files. After removing the schema part so only the root -> data part remained, they did work.
Colin