Results 1 to 5 of 5

Thread: Best method support multilanguage page

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2006
    Posts
    2

    Best method support multilanguage page

    Any suggestion to create Dynamic Content Generation to
    organizing my page to support different language.
    Any help would be appreciated, thanks..
    Last edited by ruslina; Jun 21st, 2006 at 03:28 AM.

  2. #2
    Frenzied Member
    Join Date
    Aug 2005
    Posts
    1,042

    Re: Best method support multilanguage page

    ruslina:

    Welcome to VBForum.

    Could you explain a little more about what you mean by "support different language."

    Maybe then soneone here can figure out what you have going on and can give you some suggestions.

    Good Luck

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Best method support multilanguage page

    Store the string values that are constant to your page in the database, under different language headings. Store the current user language in a session variable and everytime the page loads, based upon the session variable, populate the 'labels'.

    Note, however, that this is going to be a rather slow method as you have several database hits occurring each time the page loads.

  4. #4

    Thread Starter
    New Member
    Join Date
    Jun 2006
    Posts
    2

    Re: Best method support multilanguage page

    Hi there..

    thanks for reply..For all of your information, I already create 1 dll file (using vb6) to read the database who store field base on different languange heading.I use array method.
    The problem is...every label,table,heading etc who i use in current language must be declare in the top page using array method before I checking one by one for every single line before dll file passing the new language I select..Its so tidious...for me to change for every page.
    Any different or better method to solve this problem..

    My coding in asp page like this:
    <html>
    <TITLE>Test Read And Write Array From DLL File use this form</TITLE>
    <script language=javascript>
    </script>
    <body><form method="post" action="add_record1.asp">
    <%
    dim strver
    dim n,i
    dim strtest(),Result,Kamus
    n=5
    redim strtest(5)
    strtest(1)="No Matrik"
    strtest(2)="Nama Pelajar"
    strtest(3) = "Negeri"
    strtest(4) = "Simpan"
    strtest(5) = "Batal"
    strver="EN"
    Set Kamus=Server.CreateObject("SimpleKamus.Load_Kamus")
    for i= 1 to n
    Result=Kamus.Baca_Kamus(strtest(i),strver)
    %>
    <table border=0>
    <%if strtest(i)="No Matrik" then%>
    <tr>
    <td width=50%><%=Result %></td>
    <td>:</td>
    <td><input name="matrixid"></td>
    </tr>
    <%end if%>
    <%if strtest(i)="Nama Pelajar" then%>
    <tr>
    <td width=50%><%=Result %></td>
    <td>:</td>
    <td><input name="name" ></td>
    </tr>
    <%end if%>
    <%if strtest(i)="Negeri" then%>
    <tr>
    <td width=50%><%=Result %></td>
    <td>:</td>
    <td><input name="state" ></td>
    </tr>
    <%end if%>
    </table>
    <%Next%>
    <br /><br />
    <%
    for i= 1 to n
    Result=Kamus.Baca_Kamus(strtest(i),strver)
    %>
    <%if strtest(i)="Simpan" then%>
    <input type="Submit" name="btnSubmit" value=<%=Result%>>
    <%end if%>
    <%if strtest(i)="Batal" then%>
    <input name="reset" type="reset" value=<%=Result%>>
    <input type="reset" class="button" value=<%=Result%> onclick="return recbatal();">
    <%end if%>
    </form>
    <%Next%>
    <%
    Dim strBtn
    strBtn = Trim(Request.Form("btnSubmit"))

    If strBtn <> "" Then
    set conn=Server.CreateObject("ADODB.Connection")
    'conn.provider="microsoft.jet.oledb.4.0"
    'conn.open server.mappath("student.mdb")
    strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("student.mdb") & ";"
    conn.Open strConn
    conn.Execute "INSERT INTO student (matrixid, name,state) VALUES ('" & request.form("matrixid") & "','" & request.form("name") & "', '" & request.form("state") & "')"
    response.write
    response.End

    on error resume next
    'conn.Execute sql,recaffected
    if err<>0 then
    Response.Write("No update permissions!")
    else
    Response.Write("<h3>" & recaffected & " record added</h3>")
    end if
    conn.close
    End If
    %>
    </body>
    </html>

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Best method support multilanguage page

    Yes, it is going to be difficult and you don't have much of a choice. Consider moving to ASP.NET, where localization is much, much easier. All you need is a resource file for each language, and then populate each control from the codebehind.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width