Localizing the Interface of WebHelp Output (for DocBook Transformations)
Static labels that are used in the WebHelp output are kept in translation files in the [OXYGEN_INSTALL_DIR]/frameworks/docbook/xsl/com.oxygenxml.webhelp.classic/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 DocBook transformations, follow these steps:
- Look for the strings-[lang1]-[lang2].xml file in [OXYGEN_INSTALL_DIR]/frameworks/docbook/xsl/com.oxygenxml.webhelp.classic/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>. -
Make sure that the new XML file that you created in the previous two steps is listed in
the file
[OXYGEN_INSTALL_DIR]/frameworks/docbook/xsl/com.oxygenxml.webhelp.classic/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 the DocBook to WebHelp transformation scenarios (with or without feedback) and set
the
l10n.gentext.default.languageparameter 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.