Help on ASP

Discussion in 'ASP General' started by Anuj Mathur, Sep 22, 2003.

  1. Anuj Mathur

    Anuj Mathur Guest

    Hello All

    We are making an application for translating the literals
    (HTML text and labels) of an existing ASP website from
    English to another language, say Swedish.

    Now, for this we are employing XML document to store the
    literals and their translations. The literals are passed
    as string parameters to a translation routine that picks
    up the translated value from the XML. The XML has a ID-
    VALUE structure i.e. the translating routine would match a
    particular literal against the ID in the XML document and
    pick up the translated equivalent from VALUE part of the
    node.

    We have built a tool that mines out the literals from the
    ASP Page and stores them in the XML document. The tool
    identifies the statement after each HTML ending tag (">")
    as literals and picks them up and puts them in the XML
    document.

    Once the XML document is created, the translator would put
    the equivalent translated literal in the value part of the
    node, which the ASP page would pick up to display.

    Here, the problem that we are facing is that if a sentence
    contains a function call or a variable, then, the sentence
    gets split up in to fragments and these fragments are
    stored as individual nodes in the XML document. Thus it
    would not be possible to translate it in the said language
    as the whole sentence is now fragmented. Further, after
    translation the position of the ASP variable or Function
    call might change. For instance, the verb may come before
    the noun or the noun before the verb.

    How do we treat the function call or variable such that it
    can handle the change in position issue and also be easy
    for the translator to do his job? The solution has to be
    built using ASP, VB and XML.

    Below is an example to make my point:

    ASP Page

    <tr>
    <td align="left" class="RegularText" colspan="2">
    This screen should be used to set up new <%
    =SITENAME%> users only. Make sure you enter the user's
    correct E-Mail
    address. When you submit the page, a
    system-assigned password will be automatically e-mailed to
    the user.
    </td>
    </tr>

    In the code above, there is a variable SITENAME embedded
    in the sentence (that is causing all the problems). Now
    during translation, if we leave out the variable and just
    pick up the literals to the left and right of it.

    The XML nodes are as below:

    <KEY ID="This screen should be used to set up new"
    VALUE="This screen should be used to set up new"/>
    <KEY ID="users only. Make sure you enter the user's
    correct E-Mail address. When you submit the page, a system-
    assigned password will be automatically e-mailed to the
    user." VALUE="users only. Make sure you enter the user's
    correct E-Mail address. When you submit the page, a system-
    assigned password will be automatically e-mailed to the
    user."/>

    The complete sentence gets split up in two parts. Thus it
    would not be possible to translate it in the said language
    because after translation the position of the ASP variable
    might change. For instance, the verb may come before the
    noun or the noun before the verb.

    We cannot take the VBScript variable as a part of the
    string parameter and pass it to the translation routine,
    as then the variable would be treated as part of the
    string and would not get the value at runtime.

    Any help/ideas to tackle the above stated problem will be
    greatly appreciated.

    Thanks & Regards

    - Anuj
     
    Anuj Mathur, Sep 22, 2003
    #1
    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. =?Utf-8?B?dHJlbGxvdzQyMg==?=

    HELP! HELP! HELP! Opening Web Application Project Error

    =?Utf-8?B?dHJlbGxvdzQyMg==?=, Feb 20, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    792
    =?Utf-8?B?dHJlbGxvdzQyMg==?=
    Feb 20, 2004
  2. Harvey
    Replies:
    0
    Views:
    749
    Harvey
    Jul 16, 2004
  3. Harvey
    Replies:
    1
    Views:
    879
    Daniel
    Jul 16, 2004
  4. =?Utf-8?B?S2ltb24gSWZhbnRpZGlz?=

    HELP - HELP - HELP

    =?Utf-8?B?S2ltb24gSWZhbnRpZGlz?=, Mar 9, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    702
    Eliyahu Goldin
    Mar 9, 2006
  5. Buster

    Help, Help, Help

    Buster, Oct 4, 2003, in forum: Java
    Replies:
    3
    Views:
    484
    Saager
    Oct 30, 2003
Loading...

Share This Page