To modify the generated text for WebHelp transformations, you need to create a
DITA-OT extension plugin that uses the
dita.xsl.messages extension point. The following procedure is for
changing English labels, but you can adapt it for any language:
-
Create a com.oxygenxml.webhelp.localization plugin
directory inside the [DITA-OT DIR]/plugins/ location.
-
Create a plugin.xml file inside that
com.oxygenxml.webhelp.localization directory with the
following content:
<plugin id="com.oxygenxml.webhelp.localization">
<require plugin="com.oxygenxml.webhelp.classic"/>
<require plugin="com.oxygenxml.webhelp.responsive"/>
<feature extension="dita.xsl.strings" file="webhelp-extension-strings.xml"/>
</plugin>
-
Create a webhelp-extension-strings.xml file with the
following content:
<langlist>
<lang xml:lang="en" filename="strings-en-us.xml"/>
<lang xml:lang="en-us" filename="strings-en-us.xml"/>
</langlist>
-
Copy the strings you want to change from the translation files to the
strings-en-us.xml file. Make sure you leave the name
attribute unchanged because this is the key used to look up the string. A sample
content might be:
<strings xml:lang="en-US">
<str name="Figure">Fig</str>
<str name="Draft comment">ADDRESS THIS DRAFT COMMENT</str>
</strings>
-
Use the Run DITA-OT Integrator transformation scenario
found in the DITA Map section in the Configure
Transformation Scenario(s) dialog box.
-
In the [DITA-OT DIR]/bin directory of the DITA Open Toolkit, run one of the following scripts, depending on your
operating system:
- Windows:
[DITA-OT DIR]/bin/dita.bat --install
- Linux/Mac OS X:
[DITA-OT DIR]/bin/dita.sh --install