Help on ASP

A

Anuj Mathur

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
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top