Wednesday, June 5, 2013

Create Multilingual Sharepoint Site Columns,Content types and Lists from Visual studio programatically

·         Create resource file Eg: test.resx ; test.en-US.resx for English and for German
·         Add the key values Eg: Stringtest = Documan
·         Create site columns
·         Change the display name of site columns in element.xml as DisplayName="$Resources:Stringtest" Note:Stringtest should be in all the above resource files.
·         Now since your site columns are create in multilingual.
·         Create content type using these columns.
·         In the content types element.xml also do the same leave the FieldRef “id” “name” same but change the displayname as Eg ( DisplayName="$Resources:Stringtest ")
·         Now create the list using the content type .You the change the list definition and instance also in the same way as specified above
·         You can now deploy and check everything will be multilingual.

But Please note that these resource files should be added to the sharepoint MAPPED RESOURCE folder and also open you feature property and change the “default resource file “ to “test
As our default resource file name in test

No comments:

Post a Comment