Pages: 1
Print
Author Topic: DITA: Editing "generated text" strings for output  (Read 4095 times)
Su-Laine Yeo
Solutions Consultant
Member

Posts: 260


« on: August 02, 2010, 12:31:00 PM »

This article describes how to edit the "generated text" in output, for users of the DITA Open Toolkit (DITA OT). The DITA OT is installed with XMetaL Author Enterprise

Generated text is text that is inserted during the process of creating output, and does not come from source files. For example, "Note: " appears at the beginning of <note> elements in English.
The DITA OT will use generated text for the appropriate locale (language and region), depending on the "xml:lang" attribute that is set in your DITA source files. For example, if the xml:lang attribute indicates that your source files are in Spanish, "Nota: " will appear at the beginning of <note> elements instead of "Note: ".

Prerequisites

Strings Files for non-PDF Output
Most output formats from the DITA Open Toolkit use strings that are defined in the following folder: DITA_OT\xsl\common. The exceptions to this rule are PDF output (see below), and Eclipse Content which does not contain any formatting information.

The DITA_OT\xsl\common folder contains 47 files with the name "strings-<locale code>.xml" The locale codes used in the file names are described here: http://dita-ot.sourceforge.net/doc/ot-userguide/xhtml/localizing/aboutlocalizing.html .

To edit the strings for a particular locale, open the strings file for that locale in a suitable text editor.

Strings Files for PDF Output
It is helpful to know the following quirks of how the DITA OT is designed:
  • The strings files that are used in most output formats are not used in PDF output at all. PDF output uses an entirely different set of files.
  • By default, only 7 locales are supported in PDF output: English, French, German, Italian, Japanese, Spanish, and Simplified Chinese.
  • The names of strings files use underscores instead of hyphens, e.g. fr_FR.xml instead of fr-fr.xml. However, in the xml:lang attribute in your content, you must use hyphens in locale codes.
  • The names of strings files use capital letters for country codes, e.g. zh_CN instead of zh_cn. In the xml:lang attribute in your content, case does not seem to matter. E.g. zh-cn works just as well as zh-CN.
  • Ignore all warnings in the files that tell you to not edit the files.

If you are using the "XMetaL Enhanced PDF via RenderX XEP " deliverable type that comes with XMetaL, the strings files are in the following folder: DITA_OT\demo\xmfo\cfg\common\vars . They are overridden by any files in the following folder: \demo\xmfo\Customization\common\vars.

If you are are generating PDF output using a separate installation of the DITA Open Toolkit, the strings files are in the following folder: DITA_OT\demo\fo\cfg\common\vars . They are overridden by any files in the following folder: \demo\fo\Customization\common\vars.

Note that the zh_CN.xml file that is installed with the DITA OT contains many English strings. This is a known issue in the DITA OT.
« Last Edit: January 19, 2012, 01:39:25 PM by Derek Read » Logged

Su-Laine Yeo
Solutions Consultant
JustSystems Canada, Inc.
Pages: 1
Print
Jump to:  

email us