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

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top