Disable Language Selection of MOSS 2007 Site : Resolved

When we use variations with MOSS 2007 site, by default we get a drop down kind of control in the master page of site for language selection.

But there is a major disadvantage of this control I found while working with a publishing site.

Well the problem is if you are using some custom web part in your site and if these web parts work with query strings for their operation, then your default language selection control sucks.

Suppose you have a page URL like this “http://localhost/ENU/Pages/MyPage.aspx?FName=Kailash&LastName=Dhondiyal” and your page load the data according to your query strings (in my case this is first name and last name). Now your page loads properly in this scenario, well at this moment if you change the language of site to other language (in my case Hindi) then page post back and reload again with core URL i.e. without any query strings e.g. “http://localhost/HI/Pages/MyPage.aspx“. My page get crashed this simply means that when you change to another language you lost your all query strings data. For this purpose I create my own control for language selection so that on any language selection I can preserve my URL for proper functioning. Now I placed my custom language selection web part at proper place but I want to get rid of default language selection control so that user would use only my web part for language selection in place of default one. So below are the steps that how I disabled the default language selection control in my site.

1. Go inside the folder “C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES”
2. Open “VariationsLabelMenu.ascx” file in visual studio.
3. Comment this line “<%–<cms:VariationsLabelEcbMenu id =”varlabelmenu1″ DataSourceID=”LabelMenuDataSource” DisplayText=”<%$Resources:cms,VariationLabelMenuTitle%>” IsCallbackMode=”true” runat=”server” />–%>”
4. Save changes and close the page.
5. Do an IIS reset?
6. Voilla your default language selection control gone.


One thought on “Disable Language Selection of MOSS 2007 Site : Resolved

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s