Using xml:lang attributes to switch content?
Oxygen general issues.
-
- Posts: 9
- Joined: Thu Nov 07, 2013 2:30 am
Using xml:lang attributes to switch content?
I may have painted my company into a corner. Any help for a way out? oXygen 17.1, transforming to WebHelp.
In EN, we have made extensive use of <keywords> (because we have many standard terms, and they also get revised pretty often). We have a big file listing all the keywords, included as a mapref in each ditamap as required. Works great for English.
Now we are localizing. Worse, we are *partially* localizing, since the budget doesn't allow the whole help system at once. So imagine we have two topics, topicA and topicB, and that both include a <keyword keyref="adopt"/> embedded in their content. At launch time, only topicA will be localized, and topicB will be published in English. The desired outcome is that <keyword keyref="adopt"/> would output localized text in topicA and English in topic B.
I had hoped it might work like this:
(1) In the file of keywords, define localized variations:
(2) Add the language attribute to the topics:
and
I rather hoped that Author view for topicA would now include the "Angenommen" value, based on the language attribute switching the choice of keywords to a definition with the matching language attribute. But it does not (unless, perhaps, it would change the output values after a transformation?? But I expect not...).
So, is there any way to achieve the desired goal of these "text variables" in our keywords being published in different languages based on the xml:lang attribute of each topic? Or any other ideas? Or am I just plain busted?
Thanks in advance
In EN, we have made extensive use of <keywords> (because we have many standard terms, and they also get revised pretty often). We have a big file listing all the keywords, included as a mapref in each ditamap as required. Works great for English.
Now we are localizing. Worse, we are *partially* localizing, since the budget doesn't allow the whole help system at once. So imagine we have two topics, topicA and topicB, and that both include a <keyword keyref="adopt"/> embedded in their content. At launch time, only topicA will be localized, and topicB will be published in English. The desired outcome is that <keyword keyref="adopt"/> would output localized text in topicA and English in topic B.
I had hoped it might work like this:
(1) In the file of keywords, define localized variations:
Code: Select all
<keydef keys="adopt">
<topicmeta>
<keywords>
<keyword xml:lang="en">Adopted</keyword>
<keyword xml:lang="de">Angenommen</keyword>
</keywords>
</topicmeta>
</keydef>
Code: Select all
<task id="task_topicA" xml:lang="de"> ...
Code: Select all
<task id="task_topicB" xml:lang="en">
So, is there any way to achieve the desired goal of these "text variables" in our keywords being published in different languages based on the xml:lang attribute of each topic? Or any other ideas? Or am I just plain busted?
Thanks in advance
-
- Posts: 9437
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Using xml:lang attributes to switch content?
Hi Peter,
The xml:lang attribute is not a profiling attribute. So the DITA Open Toolkit publishing process cannot filter content based on it.
The attribute is used in various outputs to control translations for various static labels which appear in the published content (Tabel: or Figure: for example) or to control what fonts are used in the PDF output.
So not sure what the best approach would be for your case. Usually the entire DITA Map project gets translated and the translation is kept in sync with the original content.
Regards,
Radu
The xml:lang attribute is not a profiling attribute. So the DITA Open Toolkit publishing process cannot filter content based on it.
The attribute is used in various outputs to control translations for various static labels which appear in the published content (Tabel: or Figure: for example) or to control what fonts are used in the PDF output.
So not sure what the best approach would be for your case. Usually the entire DITA Map project gets translated and the translation is kept in sync with the original content.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service