Hidden language dropdown for variation in SP2007

If you are using variations on a site you will probably want to have a handy way to switch between languages.
Well in case you didn't know SharePoint already has a such dropdown natively.



Unfortunately it's hidden by default (though it was available before RTM). The reason to this is that this control will do additionnal requests to the database at each page load, so Microsoft disabled it to increase the platform performance.

To enable it open the file C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES\VariationsLabelMenu.ascx and remove the <%-- --%> (ASP comments).

<%@ Control Language="C#"   %>
<%@Assembly Name="Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%>
<%@Register TagPrefix="CMS" Assembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" namespace="Microsoft.SharePoint.Publishing.WebControls"%>
<cms:VariationsLabelEcbMenu id ="varlabelmenu1" DataSourceID="LabelMenuDataSource" DisplayText="<%$Resources:cms,VariationLabelMenuTitle%>" IsCallbackMode="true" runat="server" />
<cms:VariationDataSource id="LabelMenuDataSource" LabelMenuConfiguration="1" Filter="" runat="server"/>

Comments