The content you're reading is getting on in years
This post is on the older side and its content may be out of date.
Be sure to visit our blogs homepage for our latest news, updates and information.
LanguageSelectorCustom : LanguageSelectorControl
.defaultValue = value;
var url =
(AppendDetailItemOnLanguageChange && !
//get detail item URL parameter
var paramString =
//get the detail item UrlName
var detailItemUrl = paramString.TrimStart(
//get the actual item that matches this UrlName
var providerName = String.Empty;
DynamicModuleManager dynamicModuleManager = DynamicModuleManager.GetManager(providerName);
Type projectType = TypeResolutionService.ResolveType(
var matchingItem = dynamicModuleManager.GetDataItems(projectType)
.Where(di => di.UrlName == detailItemUrl
&& di.Status == Telerik.Sitefinity.GenericContent.Model.ContentLifecycleStatus.Live)
//set culture to langName
var tempCI = CultureInfo.CurrentUICulture;
Thread.CurrentThread.CurrentUICulture = ci;
//get UrlName for culture
var urlNameForLanguage = matchingItem.UrlName[ci];
//set back original culture
Thread.CurrentThread.CurrentUICulture = tempCI;
//Resolve the page URL and append the detail item URL to it
url = RouteHelper.ResolveUrl(url, UrlResolveOptions.Absolute);
Boyan Barnev is a Principal Information Developer at Progress. His mission is to demonstrate the unlimited capabilities of Sitefinity CMS via product documentation, SDK samples, and technical blog posts. He has graduated from the American University in Bulgaria and joined Telerik in 2011. Since then Boyan has held various positions in the company, leading the strategy and operation of the Sitefinity CMS Technical support service worldwide.
Subscribe to get all the news, info and tutorials you need to build better business apps and sites
You have the right to request deletion of your Personal Information at any time.
You can also ask us not to pass your Personal Information to third parties here: Do Not Sell My Info
Copyright © 2020 Progress Software Corporation and/or its subsidiaries or affiliates.All Rights Reserved.
Progress, Telerik, Ipswitch, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.