Re: Override culture/language based on user's profile?

  •  04-20-2009, 11:04 AM

    Re: Override culture/language based on user's profile?

    Thanks, Ken!
     
    I'll give this a try.  Is this something you've done on your site?  If so, has it worked well for you?
    override protected void OnInit(EventArgs args)
       CommunityServer.Components.User user = CommunityServer.Users.GetUser();
        uteChat.ChatApi.SetConfig("CustomCulture", user.Profile.Language);
       CuteChat.ChatApi.SetConfig("CultureType", "Client");
     base.OnInit(args);
    }
     
    I was actually thinking of doing it this way, but I'm wondering about a few issues:
     
    1.  What if two requests for "Channel.aspx" come in at the same time.  Won't the last user to set the global "CustomCulture" win?  Perhaps this page should be in a critical section (start in OnInit and end in OnUnload)?
     
    2.  What about all the "ajax" stuff going on.  Will the return values of all these ajax-calls be correctly localized?
     
    Thanks,
    Troy
View Complete Thread