This article describes how to identify the locale (language and region) of DITA content, so that the DITA Open Toolkit can process it correctly. The DITA Open Toolkit (DITA OT), a component which is used for generating output from DITA documents in XMetaL Author Enterprise Edition, applies features such as
font selection and
generated text differently depending on the document language.
Setting xml:lang in your ContentIt is strongly recommended that you set the xml:lang attribute at the root of the map file and the root of all topic files. Refer to the
list of xml:lang attributes for which the DITA OT is pre-configured. If an element in a topic should be processed as a different language than the rest of the topic, set the xml:lang attribute on that element as well.
Parameters when Generating Output from XMetaLFor Microsoft HTML Help (CHM) or JavaHelp output, add the following parameter to the Advanced tab of the Edit Deliverable Type dialog:
ANT_PARAM_args.dita.locale = <locale code>For example, to sort in Spanish, use
ANT_PARAM_args.dita.locale = es-esFor HTML, WebHelp, and "XMetaL Enhanced PDF" output, you do not need to add any parameters. Locale information will be picked up from your content.
Parameters when Generating Output Using a Standalone DITA OTFor generating Microsoft HTML Help (CHM) or JavaHelp output, set the following parameter:
args.dita.locale = <locale code> For example, to sort in Spanish, this is
args.dita.locale = es-esIn versions of the DITA Open Toolkit prior to 1.5, you must set the
document.locale parameter when generating PDF output.
For HTML output, you do not have to set any parameters. Locale information will be picked up from your content.