XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreXML 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:
  #1  
Old July 4th, 2012, 08:09 AM
Bartias Bartias is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2012
Posts: 4 Bartias User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 37 m 23 sec
Reputation Power: 0
Translating XML

Hello - I have a question about translating XML code. I am not sure which parts are the actual code, and which parts are to be viewed by the user, and therefore translated. I have bolded what I suppose I shall translate:

<organizations default="interface_01">
<organization identifier="interface_01">
<title><![CDATA[IP Video Surveillance and Storage]]></title>
<item identifier="course_launch" identifierref="mainindex">
<title><![CDATA[IP Video Surveillance and Storage]]></title>
</item>
<imsss:sequencing>
<imsss:controlMode choice="true" choiceExit="true" flow="true" forwardOnly="false"/>
<imsssostConditionRule>
<imsss:ruleConditions>
<imsss:ruleCondition condition = "always"/>
</imsss:ruleConditions>
<imsss:ruleAction action="continue" />
</imsssostConditionRule>
</imsss:sequencing>
</organization>
</organizations>

I am not sure about "true" "false", "always" and "continue" elements - are they parts of the code? Or maybe it depends on DTD or something?

I don't know too much about programming.
Thanks for help

Reply With Quote
  #2  
Old July 4th, 2012, 08:27 AM
salem's Avatar
salem salem is offline
Contributed User
Click here for more information
 
Join Date: Jun 2005
Posts: 3,838 salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)  Folding Points: 153 Folding Title: Novice Folder
Time spent in forums: 2 Months 3 Weeks 2 Days 17 h 9 m 51 sec
Reputation Power: 1774
What do you mean "translate"?

The embedded text to a foreign language (but still retaining the XML), so

IP Video Surveillance and Storage
becomes
Vidéosurveillance sur IP et de stockage

Or translate the XML into something else, like say HTML for displaying in a nice pretty browser?
__________________
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper

Reply With Quote
  #3  
Old July 4th, 2012, 08:43 AM
Bartias Bartias is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2012
Posts: 4 Bartias User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 37 m 23 sec
Reputation Power: 0
Well, of course I meant translating between natural human languages

So, I need (can) only translate these parts of the text that are to be read by the end-user of the software.

Thanks

Reply With Quote
  #4  
Old July 4th, 2012, 01:12 PM
salem's Avatar
salem salem is offline
Contributed User
Click here for more information
 
Join Date: Jun 2005
Posts: 3,838 salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)  Folding Points: 153 Folding Title: Novice Folder
Time spent in forums: 2 Months 3 Weeks 2 Days 17 h 9 m 51 sec
Reputation Power: 1774
> I am not sure about "true" "false", "always" and "continue" elements - are they parts of the code? Or maybe it depends on DTD or something?
I would probably leave those alone for now, until you understand more.

Do you have some means of automatic translation, if you've managed to get as far as say extracting "interface_01"?

The XML standard
Some information on xml:lang
This last one might be worth a look, as it would allow you to store multiple translations in the same XML file, which might be easier from a data management point of view. That is assuming that the consumer of this XML is savvy enough to deal with xml:lang to begin with.

> I don't know too much about programming.
So what do you know?
Which programming languages, which operating systems, which compiler(s) and so on.

Reply With Quote
  #5  
Old July 4th, 2012, 02:47 PM
Bartias Bartias is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2012
Posts: 4 Bartias User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 37 m 23 sec
Reputation Power: 0
Well, I think you misunderstood me

>So what do you know?

I am a translator, I specialize in legal and literary translations.
I know how to use some CAT tools, but it is not a case here.

I want to cooperate with a new agency, and as a part of the recruitment (apart from translation and CAT tools test) i have to answer the question:
Software Translation) Please highlight the text that would be translated in the following xml strings excerpt: (and below is the excerpt that i have pasted)

I am not a software translator nor a programmist (and I'm not aiming at these positions but I have to complete this task. There is no automatic translation tool whatsoever in this task. Just the fragment of the code and the question (isn't it too little information?)

Thank you

Reply With Quote
  #6  
Old July 5th, 2012, 02:26 AM
salem's Avatar
salem salem is offline
Contributed User
Click here for more information
 
Join Date: Jun 2005
Posts: 3,838 salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)salem User rank is General 12nd Grade (Above 100000 Reputation Level)  Folding Points: 153 Folding Title: Novice Folder
Time spent in forums: 2 Months 3 Weeks 2 Days 17 h 9 m 51 sec
Reputation Power: 1774
OIC,

Without knowing the context in which the XML is used, I would just stick with translating
<title><![CDATA[IP Video Surveillance and Storage]]></title>

XML attribute names with names like identifier, eg
<organization identifier="interface_01">
are almost certainly used control some aspect of processing elsewhere, and not just used to display information to the end user.

Reply With Quote
  #7  
Old July 5th, 2012, 05:29 AM
Bartias Bartias is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2012
Posts: 4 Bartias User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 37 m 23 sec
Reputation Power: 0
Great, thank you.

Can you tell me whether the DTD file would contain some hints for the translator? I mean, if I had a DTD for this script, would it be possible to determine whether to translate other elements (e.g. "interface_01")?

Reply With Quote
  #8  
Old July 6th, 2012, 02:20 AM
a.brillant a.brillant is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2012
Posts: 2 a.brillant User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 28 m 55 sec
Reputation Power: 0
you could add the "xml:lang" attribute inside your XML document for setting your current language

Best regards,

A.Brillant

Reply With Quote
  #9  
Old July 8th, 2012, 05:16 PM
pagi pagi is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2012
Posts: 1 pagi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 m 28 sec
Reputation Power: 0
Quote:
Originally Posted by salem
OIC,

Without knowing the context in which the XML is used, I would just stick with translating
<title><![CDATA[IP Video Surveillance and Storage]]></title>

XML attribute names with names like identifier, eg
<organization identifier="interface_01">
are almost certainly used control some aspect of processing elsewhere, and not just used to display information to the end user.

Hi,

Did I get it correctly, that you would translate only "IP Video Surveillance and Storage" and nothing more?

Thx in advance,
pagi.

Reply With Quote
  #10  
Old July 17th, 2012, 08:49 AM
Demurral Demurral is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2012
Posts: 1 Demurral User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 m 54 sec
Reputation Power: 0
however,
![CDATA[IP Video Surveillance and Storage]]
has brackets and ! before and after, which mean it is an element and should not be translated, is it? That is, it is a "identified element" that has been previously explained...is it?


<organizations default="interface_01">
<organization identifier="interface_01">
<title><![CDATA[IP Video Surveillance and Storage]]></title>
<item identifier="course_launch" identifierref="mainindex">
<title><![CDATA[IP Video Surveillance and Storage]]></title>
</item>
<imsss:sequencing>
<imsss:controlMode choice="true" choiceExit="true" flow="true" forwardOnly="false"/>
<imsssostConditionRule>
<imsss:ruleConditions>
<imsss:ruleCondition condition = "always"/>
</imsss:ruleConditions>
<imsss:ruleAction action="continue" />
</imsssostConditionRule>
</imsss:sequencing>
</organization>
</organizations>

I understand that the parts to be translated are those between quotation marks, like "true" and so. And also, any tag like <organization> COULD be translated to make easier the work of the other developers which are not English, BUT it would not be a absolute condition, since the browser would understand them anyway. Is it true?

Reply With Quote
  #11  
Old September 19th, 2012, 01:37 AM
seomounts seomounts is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2012
Location: Bangkok and Vietnam
Posts: 22 seomounts User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 28 m 59 sec
Reputation Power: 0
It gives me False . Then I submitted this to my instructor, he will answer for this soon.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > Translating XML

Developer Shed Advertisers and Affiliates



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 | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap