Dynamically Change Codepage?

Discussion in 'ASP General' started by Alex, Oct 29, 2004.

  1. Alex

    Alex Guest

    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
     
    Alex, Oct 29, 2004
    #1
    1. Advertising

  2. 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

    "Alex" <> wrote in message
    news:...
    > 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
    >
    >
     
    Ray Costanzo [MVP], Oct 29, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mike Prager

    Culture and Codepage question

    Mike Prager, Aug 30, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    1,442
    Mike Prager
    Aug 30, 2003
  2. Benny Ng
    Replies:
    0
    Views:
    371
    Benny Ng
    Jun 17, 2004
  3. Yahya Saad

    Two Codepage

    Yahya Saad, Oct 13, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    413
    Yahya Saad
    Oct 13, 2004
  4. Daatmor

    Codepage problem

    Daatmor, Jun 15, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    4,562
    Joerg Jooss
    Jun 17, 2005
  5. Richard Ivarson

    Codepage for Win32 dosbox

    Richard Ivarson, Jun 29, 2003, in forum: Java
    Replies:
    1
    Views:
    4,599
    Richard Ivarson
    Jul 1, 2003
Loading...

Share This Page