see related topic here:
http://forum.snitz.com/forum/topic.asp?TOPIC_ID=36223
test.asp
<%
if Trim(Request.QueryString("lan")) <> "" then
strUserLan = Lcase(Trim(Request.QueryString("lan")))
else
strUserLan = "en"
end if
Execute(GetFileContents(strUserLan & ".asp"))
%>
<a href="?lan=en">en</a>
<a href="?lan=jp">jp</a>
<%
response.write str1
Function GetFileContents(strIncludeFile)
On Error Resume Next
Dim objFSO
Dim objText
Dim strPage
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objText = objFSO.OpenTextFile(Server.MapPath(strIncludeFile))
GetFileContents= objText.ReadAll
objText.Close
Set objText = Nothing
Set objFSO = Nothing
IF Err Then
Response.Write "Error open this language package file<<" & strIncludeFile & ">>!"
Response.End
END IF
End Function
%>
en.asp
Public const str1="english"
jp.asp
Public const str1="japanese"
I found on the web that public const is used here, what's the difference of const and variable here? and it seems that public const works, as one can change the value of it, should I declare it as a const?
what should be used here?
Thanks.
<