I am trying to have my website as a multiple languages
I would like to get all language settings in 1 connection to the database.
I am using Dictionary to add all the languages to diction.
My problem is that I am using Server.Execute to Execute the page contact.asp and when i use Server.Execute i loose my dictionary that i used in my default.asp and cant use it the contact.asp
This is my code in the default.asp
In my default.asp when i want to display my info i use it like this <%=Diction.Item(8)%> and this work as long as it is in default.asp
If i use Server.Execute("contact.asp"). In contact.asp i would like to show the info from the diction that i looped and added it from default.asp <%=Diction.Item(9)%> but it doesnt work, the error message i get is object required.
I know that I am missing this line in contact.asp
Set Diction = CreateObject("Scripting.Dictionary")
Hope you understand what i mean.
I would like to get all language settings in 1 connection to the database.
I am using Dictionary to add all the languages to diction.
My problem is that I am using Server.Execute to Execute the page contact.asp and when i use Server.Execute i loose my dictionary that i used in my default.asp and cant use it the contact.asp
This is my code in the default.asp
Code:
Dim Diction
language = "Swe"
Set Diction = CreateObject("Scripting.Dictionary")
Set ObjRecordSet = Open("Select Lang, LangNo, Info From tblWebsite Where Lang={0} Order by LangNo", Array(language))
While Not ObjRecordSet.EOF
intTemp = ObjRecordSet.Fields.Item("LangNo")
strTemp = Trim(ObjRecordSet.Fields.Item("Info"))
Diction.Add intTemp, strTemp
ObjRecordSet.MoveNext
Wend
ObjRecordSet.Close
Set ObjRecordSet = Nothing
If i use Server.Execute("contact.asp"). In contact.asp i would like to show the info from the diction that i looped and added it from default.asp <%=Diction.Item(9)%> but it doesnt work, the error message i get is object required.
I know that I am missing this line in contact.asp
Set Diction = CreateObject("Scripting.Dictionary")
Hope you understand what i mean.