Localizing the Interface of WebHelp Output (for DITA Map Transformations)
Static labels that are used in the WebHelp output are kept in translation files in
the
DITA_OT_DIR/plugins/com.oxygenxml.webhelp/oxygen-webhelp/resources/localization
folder.
Translation files have the strings-lang1-lang2.xml name format, where lang1
and lang2 are ISO language codes. For example, the US English text is kept in the
strings-en-us.xml file.
To localize the interface of the WebHelp output for DITA map transformations, follow these steps:
- Look for the strings-[lang1]-[lang2].xml file in
DITA_OT_DIR/plugins/com.oxygenxml.webhelp/oxygen-webhelp/resources/localization
directory (for example, the Canadian French file would be: strings-fr-ca.xml). If it does not exist, create one starting from the strings-en-us.xml file. - Translate all the labels from the above language file. Labels are stored in XML
elements that have the following format:
<str name="Label name">Caption</str>
. - Run the predefined transformation scenario called Run DITA OT Integrator by executing it from the Apply Transformation Scenario(s) dialog box. If the integrator is not visible, enable the Show all scenarios action that is available in the Settings drop-down menu.
- Make sure that the new XML file that you created in the previous two steps is listed
in
the file
DITA_OT_DIR/plugins/com.oxygenxml.webhelp/oxygen-webhelp/resources/localization/strings.xml
. In our example for the Canadian French file, it should be listed as:<lang xml:lang="fr-ca" filename="strings-fr-ca.xml"/>
. - Edit any of the DITA Map to WebHelp transformation scenarios (with or without feedback, or the mobile version) and set the args.default.language parameter to the code of the language you want to localize (for example, fr-ca for Canadian French).
- Run the transformation scenario to produce the WebHelp output.