The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages - More
> XML Programming
|
Translating XML
Discuss Translating XML in the XML Programming forum on Dev Shed. Translating XML XML Programming forum discussing XML and related technologies, including XUL and XSL. XML is a self-describing file format, designed for maximum compatibility between applications.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

July 4th, 2012, 08:09 AM
|
|
Registered User
|
|
Join Date: Jul 2012
Posts: 4
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"/>
<imsss  ostConditionRule>
<imsss:ruleConditions>
<imsss:ruleCondition condition = "always"/>
</imsss:ruleConditions>
<imsss:ruleAction action="continue" />
</imsss  ostConditionRule>
</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
|

July 4th, 2012, 08:27 AM
|
 |
Contributed User
|
|
|
|
|
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?
|

July 4th, 2012, 08:43 AM
|
|
Registered User
|
|
Join Date: Jul 2012
Posts: 4
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
|

July 4th, 2012, 01:12 PM
|
 |
Contributed User
|
|
|
|
> 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.
|

July 4th, 2012, 02:47 PM
|
|
Registered User
|
|
Join Date: Jul 2012
Posts: 4
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 
|

July 5th, 2012, 02:26 AM
|
 |
Contributed User
|
|
|
|
|
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.
|

July 5th, 2012, 05:29 AM
|
|
Registered User
|
|
Join Date: Jul 2012
Posts: 4
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")?
|

July 6th, 2012, 02:20 AM
|
|
Registered User
|
|
Join Date: Jul 2012
Posts: 2
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
|

July 8th, 2012, 05:16 PM
|
|
Registered User
|
|
Join Date: Jul 2012
Posts: 1
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.
|

July 17th, 2012, 08:49 AM
|
|
Registered User
|
|
Join Date: Jul 2012
Posts: 1
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"/>
<imsss  ostConditionRule>
<imsss:ruleConditions>
<imsss:ruleCondition condition = "always"/>
</imsss:ruleConditions>
<imsss:ruleAction action="continue" />
</imsss  ostConditionRule>
</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?
|

September 19th, 2012, 01:37 AM
|
|
Registered User
|
|
Join Date: Sep 2012
Location: Bangkok and Vietnam
Posts: 22
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.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|