locked
Override browser locale RRS feed

  • Question

  • User-955326108 posted

    Hello!

    How can I override the browser language settings with a value in a cookie?

    I currently use resource files and I can't understand how to make them listen to my cookie, since they read the settings in the browser directly.

    Any ideas?

    Cheers!

    /Eskil

    Thursday, March 5, 2009 9:53 AM

Answers

  • User312158796 posted

    You use:

    System.Threading.Thread.CurrentCulture = {your culture from cookie}

    You might also have to set the Thread.CurrentUICulture as well.  You should to this at the init stage of the page lifecycle s wel I think.  Have a look at this video http://www.asp.net/learn/videos/video-40.aspx

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, March 30, 2009 4:20 PM