Get LinkURL to another language

I’ve had some problem to link to a page to another language then the current language.
Even though I have a PageData-object with anouther languagebranch, it stills makes a link to the current language.

My own solution, building a url by CurrentPage.StaticLink and adding epslanguage=langID, works but it’s not how I want to do it.

So today I found the EPiServer.UriSupport class. In that class you have EPiServer.UriSupport.AddLanguageSelection(pd.LinkURL, pd.LanguageID), just what I’ve been looking for.

Tags: , , , ,

Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>