I have set up a publishing site on my SharePoint 2010 beta environment, set up variations for English and French and installed the French language pack. My masterpage is based off of the new nightandday.master. I thought that variations would appear automatically (since it is a publishing site) once I turned variations on and made sure that everything is published and approved, still nothing appeared on the page. I decided to check out Microsoft’s SharePoint 2010 beta documentation on the variation controls [1], but that didn’t help either.
At this point, I remembered that in SharePoint 2007, we needed to uncomment the VariationsLabelEcbMenu control to allow it to render (C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions12TEMPLATECONTROLTEMPLATESVariationsLabelMenu.ascx). Refer to this post [2]:
<%--<cms:VariationsLabelEcbMenu id ="varlabelmenu1" DataSourceID="LabelMenuDataSource"
DisplayText="<%$Resources:cms,VariationLabelMenuTitle%>" IsCallbackMode="true"
runat="server" />--%>
However, in the SharePoint 2010 installation, this line didn’t even exist.
So I decided to add it and see what would happen and it gave me an error that it couldn’t find the VariationLabelMenuTitle resource:
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: The resource object with key ‘VariationLabelMenuTitle’ was not found
I then went to the cms.resx file in the web application root to see if existed and sure enough, it didn’t.
So in the end I just stripped out the reference to the resource file and just added this line to the VariationLabelMenu.ascx control to get it to work:
<cms:VariationsLabelEcbMenu id ="varlabelmenu1" DataSourceID="LabelMenuDataSource"
DisplayText="Links to Variations" IsCallbackMode="true" runat="server" />
P.S. You don’t have to make any changes to the publishing page, it is this delegate control that actually renders the variationlabelmenu control that already exists in the master page with all references:
<SharePoint:DelegateControl runat="server" ControlId="GlobalSiteLink0"/>
[1] http://msdn.microsoft.com/en-us/library/ms551625(office.14).aspx
[2] http://blog.hametbenoit.info/Lists/Posts/Post.aspx?ID=168