This topic is locked
[SOLVED]

 Session("language") = "french"

6/3/2013 11:38:31 PM
ASPRunnerPro General questions
G
georgeb author

I have tried this code in the before process and the before display the title changes to french but all other fields are blank until i refresh the page.
I have also tried in the javascript onload document.writeln('Session("language") = "French"') the line is written and replaces the page.
How do I programmatically change the language?

G
georgeb author 6/4/2013

issue: when I set session("Language") = new language in the before display the header row language is changed to the new language but the field names are blank. this code solves the issue. if anyone knows a better way I would appreciate a post. this is a bit of a hack
change language programatically example
in Function BeforeProcessAdd(conn,pageObject) add:

if mlang_getcurrentlang()="English" then

Session("refresh") = 1

end if

in Function BeforeShowAdd(xt,templatefile,pageObject) add:
if session("refresh") = 1 then

session("refresh") = 0

session("Language")="French"

Response.Redirect "dbo_files5_add.asp" 'refreshes the page with new language setting

response.write mlang_getcurrentlang()

end if