ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now!
  #1  
Old September 22nd, 2003, 04:32 AM
mathuranuj mathuranuj is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 2 mathuranuj User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Help on ASP & XML

Hello All

I am facing a peculiar issue in my project.

Let me first tell a bit about the project, to set the context.
Well, it deals with translating the literals (HTML text and labels) of an existing ASP website from English to, 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 Mathur

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Help on ASP & XML


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway