dragoon
Posts: 173
|
| Posted: 01/21/2006, 7:28 AM |
|
hello there,
i want to change the locale session variable dynamically in a page. is it possible?
actually I'm doing this but the page isn't translated. I'm changing it in the After Initialize Event.
If I refresh the page it's OK, but I want to do this without refreshing the page.
|
 |
 |
peterr
Posts: 5971
|
| Posted: 01/21/2006, 11:59 AM |
|
Just as a test try changing the session's value somewhere at the beginning of the generated page code, without using events. If that works then you can probably just leave your code there, as long as it's not within any of the grey code blocks.
If it doesn't work there then we can think of alternatives.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
dragoon
Posts: 173
|
| Posted: 01/22/2006, 6:02 AM |
|
isn't working.the project is in .NET.
I have placed that piece of code in Page_Load Event. i think I can't go further.
string server_LOGON_USER = Request.ServerVariables["LOGON_USER"].Substring(Request.ServerVariables["LOGON_USER"].IndexOf("\\") + 1);
string UserLocale = (string)(new TextField("",Settings.Connection1DataAccessObject.ExecuteScalar("SELECT app_language FROM app_language WHERE app_language_id = (select app_language_id from users where user_samaccount='"+server_LOGON_USER+"')"))).GetFormattedValue("");
HttpContext.Current.Session["locale"] = UserLocale;
|
 |
 |
dragoon
Posts: 173
|
| Posted: 01/22/2006, 11:52 AM |
|
I've made further tests; it seems that when the session variable it's expiring it it reset to the default language.
I have a page where I'm redirect users when their session expires; there I’m reloading the session variables + I' m displaying a banner about security concerns and blah, blah ...stuff like this.
Well right now I'm doing one supplementary loop: I'm comparing the session variable that has been reinitialized by itself with the value from the user's profile, if they don't match, I'm reloading the page with the new language session variable set.
|
 |
 |
chandraprakash
|
| Posted: 02/16/2006, 4:28 AM |
|
in jsp how to use session integer array variable
|
|
|
 |
|