March 21, 2011
This is a kind of weird thing about the LinkURL property of a PageData object in EPiServer. Even though the page in in a specific language, the LinkURL will ignore that and return a link to the current language version instead.If you want the URL to be in the same language as the page is, instead of:
string url = page.LinkURL;
..start using AddLanguageSelection and pass the page´s language ID:string url = EPiServer.UriSupport.AddLanguageSelection(page.LinkURL, page.LanguageID);
Comments
comments powered by Disqus