How to configure properly - Issue with redirect

Topics: General, Troubleshooting
Nov 24, 2011 at 9:27 AM

Hi all,

I was playing with culturepicker and I ran in the below issue.

I created a local for en-US for my homepage (it-IT) that are located at

http://localhost/OrchardLocal (it-IT)

http://localhost/OrchardLocal/home-en-US (en-US)

in UserCultureController.cs I have

RoutePart currentRoutePart;
//returnUrl may not correspond to any content and we use "Try" approach
if (_localizableContentService.TryGetRouteForUrl(returnUrl, out currentRoutePart)) 
{
    RoutePart localizedRoutePart;
    //content may not have localized version and we use "Try" approach

    if(_localizableContentService.TryFindLocalizedRoute(currentRoutePart.ContentItem, cultureName, out localizedRoutePart)) 
        returnUrl = localizedRoutePart.Path;
}

Path is empty, while Slug have the right value "/home-en-US"

How should I configure it? Thank you