SharePoint 2013 and Localization through CSOM

Copper Contributor

Hi, I have a question regarding localization of fields, contenttypes, list etc. using CSOM for SharePoint 2013. According to this technet article (https://msdn.microsoft.com/en-us/pnp_articles/create-sharepoint-content-types-by-using-csom) "features introduced in SharePoint 2013 SP1" would make it possible to set the TitleResource/DescriptionResource properties using CSOM. I have tried downloading the Client Components SDK references in the article without luck, the properties are not available in these dlls. For further information, at my client we are at October 2015 CU (15.0.4763.1000) and still can't find the properties in those csom dlls. Does anyone know if this information is wrong? And if so, is there any plans to introduce this for 2013 at all? 

6 Replies

Hi Johannes,

 

At this moment i am creating contenttypes with PNP which also uses csom. I can set name etc.

Don't know what you try to achieve but looking into PNP would be a good if you are provisioning.

 

Kr,

 

Paul

The question has nothing to do with creating content types using CSOM. My question is about localizing titles of for example content types (but also web, list, field etc) using Csom. Since long this has been possible using "TitleResource"-property using server side object model, and it is also available in CSOM for SP 2016 and CSOM for SP Online.

 

According to the references technet article it is suppose to be supported in SP2013 with SP1 as well, but as far as I can see it's not there. Hence my question!

My understanding is that this capability is not still in SP 2013 but it will come at some time via CU...I hope someone from the team can drop some light on this topic

Hi Johannes,

TitleResource property is not available SharePoint 2013 CSOM so far. However some objects (e.g. Field) has SchemaXmlWithResourceTokens property which may be used to provision objects as XML with resource tokens inside e.g.:

<Field DisplayName="$Resources:core,Created_By" Type="Text" StaticName="MyField" Name="MyField" .../>

 

Br, Ivan

Any news on this topic? Would need to use that feature too.

 

In the past some changes in CSOM for SP2013 have been made through CUs as well without big announcements, maybe something changed in the last few months?

 

Imho it's a pitty, that such "simple changes" have not been merged back into SP2013 although they have been already implemented for SP2016 and SPO.

 

My only idea is to have a farm solution (service) running, which will be called after Lists and Views have been provisioned with PnP in order to set translations on the items...

Hi Pascal,

 

I while back I got an answer from Vesa Juvonen in the PnP Yammer Network (which is now closed), where he stated that there are no plans to introduce this capability in a future CU for SP2013. So I think thats the reality we have to live with, and to be honest, your solution doesnt sound to bad, even though it can get tricky to combine that with provisioning sites with for example the PnP Provisioning Engine etc.