Try Now
More in this section

Forums / Developing with Sitefinity / Changing language by code

Changing language by code

1 posts, 0 answered
  1. Ale
    Ale avatar
    0 posts
    21 Jul 2016
    22 Aug
    Link to this post


    I have a site with several languages and a language selector. I need to change the site language by code without changing the url.

    Currently I'm doing this

    Thread.CurrentThread.CurrentCulture = culture;
    Thread.CurrentThread.CurrentUICulture = culture;

    This works for labels inside the page, but it always renders the default language version of the page and not the one I need.

    Is there any way to achieve this without appending the language prefix to the url?

1 posts, 0 answered