words in different languages
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 147
- Joined: Sat Oct 19, 2013 8:21 am
words in different languages
Hi,
In dita i use <note with attribute type.
I used chinese with file vars / zh_CN.xml (contains traduct for mention important, note, ...)
in the file that contains the note tag i indicate xml:lang="zh_CN"
But in publication the word is not translated ?
Thank you for your response
In dita i use <note with attribute type.
I used chinese with file vars / zh_CN.xml (contains traduct for mention important, note, ...)
in the file that contains the note tag i indicate xml:lang="zh_CN"
But in publication the word is not translated ?
Thank you for your response
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: words in different languages
Hi,
I tested and setting the xml:lang="zh-CN" attribute on the note seems to work for me both for the PDF and for the WebHelp outputs using the DITA OT bundled with Oxygen 16.1. The static text "Note" was properly translated to chinese.
Regards,
Radu
I tested and setting the xml:lang="zh-CN" attribute on the note seems to work for me both for the PDF and for the WebHelp outputs using the DITA OT bundled with Oxygen 16.1. The static text "Note" was properly translated to chinese.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: words in different languages
Hi,
If you want this for the PDF output there is an XSLT stylesheet:
OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/plugins/org.dita.pdf2/xsl/common/vars.xsl
which contains a template called insertVariable. That template gets called from many XSLT templates with the key to be translated and it maps the key to one of the translation XML files taking the current language into account.
Regards,
Radu
If you want this for the PDF output there is an XSLT stylesheet:
OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/plugins/org.dita.pdf2/xsl/common/vars.xsl
which contains a template called insertVariable. That template gets called from many XSLT templates with the key to be translated and it maps the key to one of the translation XML files taking the current language into account.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: words in different languages
Hi,
Let's take of the case of the DITA <note>.
In the XSLT:
OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\org.dita.pdf2\xsl\fo\commons.xsl
there is an XSLT template:
which at some point in order to output the static translate "Note:" content calls:
That "insertVariable" template I previously mentioned calls another template called findVariable which uses the XSLT document function to read various XML configuration files. You can add xsl:messages in the code to better see how it works.
Regards,
Radu
Let's take of the case of the DITA <note>.
In the XSLT:
OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT\plugins\org.dita.pdf2\xsl\fo\commons.xsl
there is an XSLT template:
Code: Select all
<xsl:template match="*" mode="placeNoteContent">
.....
Code: Select all
<xsl:call-template name="insertVariable">
<xsl:with-param name="theVariableID" select="'Note'"/>
</xsl:call-template>
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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