Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Poornima Nayar 106 posts 276 karma points MVP 5x c-trib
    May 17, 2016 @ 12:42
    Poornima Nayar
    0

    Multi lingual site - setting culture programatically

    Hi,

    I am building a multi-lingual site. Instead of using the Umbraco languages for each site in the node I want each site to look up at at Site Config node and set the site culture from the property value set on the node. Is that possible? Any help much appreciated.

    Poornima

  • Cristhian Amaya 52 posts 423 karma points
    May 17, 2016 @ 12:49
    Cristhian Amaya
    0

    Hi Poornima,

    before replying I've got to ask, what do you need to do that?

    And now, answering your actual question, you can use the thread culture, for example:

    var cultureInfo = CultureInfo.GetCultureInfo("es-ES");
    Thread.CurrentThread.CurrentCulture = cultureInfo;
    Thread.CurrentThread.CurrentUICulture = cultureInfo;
    

    Cheers!

  • Poornima Nayar 106 posts 276 karma points MVP 5x c-trib
    May 17, 2016 @ 12:57
    Poornima Nayar
    0

    Yes I tried this and I didn't hit much luck!

Please Sign in or register to post replies

Write your reply to:

Draft