Dynamically Change Codepage?

A

Alex

Dear all,

I am now creating an CMS which support 3 languages (English, Traditional
Chinese and Simplified Chinese). The user can change their languages
dynamically; however, I would like to know how can I change the codepage (<%
code=936%>) dynamically? THank you for all of your help.

Alex Yung
 
R

Ray Costanzo [MVP]

You could put a dropdown at the top of the page like so.

<%
Select Case Request.Querystring("l")
Case "b"
Session.CodePage = 936 'or whatever traditional Chinese is
Case "c"
Session.CodePage = 932 'or whatever simplified Chinese is
Case Else
Session.CodePage = 1252
End Select
%>

<select name="l"
onchange="location.href='<%=Request.ServerVariables("PATH_INFO")%>?l='+this.value;">
<option value="a">English</option>
<option value="b">Traditional Chinse</option>
<option value="c">Simplified Chinese</option>
</select>

Ray at work
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top