[DITA OT]Question about language publication

Post here questions and problems related to editing and publishing DITA content.
Le Basque
Posts: 147
Joined: Sat Oct 19, 2013 8:21 am

[DITA OT]Question about language publication

Post by Le Basque »

Hi,

Can you explic me the relation with xml-lang and variable file <language>.xml

Example :

Code: Select all


<map id="MAP_1" xml:lang="en-us">
and en.xml

can you give me an example for Chinese

Thank you
Radu
Posts: 9446
Joined: Fri Jul 09, 2004 5:18 pm

Re: [DITA OT]Question about language publication

Post by Radu »

Hi,

I will assume this question is related to the PDF output.
In the folder:

OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/plugins/org.dita.pdf2/cfg/common/vars

you have for each supported language translations for the static texts (like Table or Figure) which may appear in the generated PDF output.

This XSLT stylesheet:

OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/plugins/org.dita.pdf2/xsl/common/vars.xsl

has an XSLT template called "insertVariable" which looks at the current XML node to find the closest xml:lang attribute defined relative to it and then to find the proper translation file to look into. You can add some xsl:messages there to see how everything works.

In your case for Chinese you would need to add the attribute xml:lang="zh-CN" to all the DITA topic and map root elements, so setting it just on the main root map is not enough.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply