Search code examples
sharepointxsltsharepoint-2010web-parts

Sharepoint 2010 - List name and column header display name change through XSL


I have a site collection (localhost) that has two variations (localhost/en/, localhost/fr/).

I have a list in the root web (sampleList) that has the following columns: title, description, date

I have English and French pages (/en/samplePage.aspx, /fr/samplePage.aspx) that uses sampleList as a shared web part.

Is there any way of modifying the web part on the French page (perhaps through the XSL Link field on the tool part) such that I can modify the list name and the column names of the list to be displayed in French?


Solution

  • You should be able to do that in SP Designer. Here's a tutorial kinda what you need: http://maulikdhorajia.blogspot.com/2011/06/sharepoint-2010-customizing.html
    You'll want to edit the page in designer ("edit in advanced mode") - then do steps 7 - 10 from the link. After that, it'll be a matter of locating the references to the column names, removing them, then hard coding in new French names.

    One word of caution, there's a tricky bugger related to ddwrt:ghost="hide" tags you'll see in the xslt. Wherever you make changes, you'll probably need to find the preceding ddwrt:ghost="hide" and change it to ddwrt:ghost="" - or else you'll see your changes in desiger, but not in the actual site - you can read more about that here: http://www.sharepointbandaid.com/ddwrt/

    In general, I usually had trouble do this, I preferred using the content query web part instead. Also, hopefully this all makes sense, I haven't been in-front of SharePoint for awhile so I'm working from memory (which ain't what it used to be).