Change language and change host

Vote:
 

I'v defined the following in my web.config

<siteHosts>
              <add name="site.com.local" language="en" />
              <add name="site.se.local" language="sv" />
              <add name="*" />
            </siteHosts>

works like a charm.

Now, if I want to change language when surfing around on one site to the other, can I in a easy way change the host defined in siteHosts aswell?

Today i use the following:

return string.Format(@"<a href=""{0}"" class=""{1}"">{2}</a>", EPiServer.UriSupport.AddLanguageSelection(pd.LinkURL, pd.LanguageID), pd.LanguageBranch, Translate("/lang/" + pd.LanguageBranch));

I guess I can use EPiServer.Configuration.SiteElement to obtain the siteHost, but is there a method that can do this automagically? 

#19941
May 15, 2008 17:51
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.