Copied to clipboard

Flag this post as spam?

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


  • Sebastiaan Janssen 5061 posts 15523 karma points MVP admin hq
    Oct 13, 2010 @ 12:50
    Sebastiaan Janssen
    0

    Set culture manually somehow

    So here's a tricky one..

    I'm trying to submit a form through my RESTContour package and want the resulting XSLT translated e-mail to use dictionary items. However, since this the submit to Contour is done through the server (rather than through the client's browser), it can't detect the culture, so it uses the default culture.

    Is there a way in which I can set the culture, in /base?

    I've tried just executing below code as the first code in my /base class, but I think that it's too late:

    var culture = new CultureInfo("nl-NL");
    System.Threading.Thread.CurrentThread.CurrentCulture = System.Threading.Thread.CurrentThread.CurrentUICulture = culture;

     

  • Stefan Kip 1614 posts 4131 karma points c-trib
    Oct 13, 2010 @ 13:35
    Stefan Kip
    0

    Look out for umbraco's default.aspx (like I said in the forum topic I sent to you on Twitter). It is probably too late in the /base class...

  • Sebastiaan Janssen 5061 posts 15523 karma points MVP admin hq
    Oct 13, 2010 @ 13:47
    Sebastiaan Janssen
    0

    I was being stupid and copied over the wrong .dll file.. D'OH!

    So, never mind, disregard, all is well in Contour land! :-D

Please Sign in or register to post replies

Write your reply to:

Draft