How to Localize the Interface of DocBook to WebHelp Classic Output
Static labels that are used in the WebHelp output are kept in translation files in the [DocBook XSL directory]/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 [DocBook XSL directory]/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 [DocBook XSL
directory]/com.oxygenxml.webhelp.classic/oxygen-webhelp/resources/localization/strings.xml.
For example, a Canadian French file would be listed as:
<lang xml:lang="fr-ca" filename="strings-fr-ca.xml">
. - Edit any of the DocBook to WebHelp transformation scenarios (with or without feedback) and set the l10n.gentext.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.