Oxygen XML Author Eclipse plugin comes with support for the following built-in languages: English, French, German, Japanese, and Chinese. It is possible to edit existing localization strings or add a new language.
Static labels used in the WebHelp output are stored in translation files that have the strings-lang1-lang2.xml name format, where lang1 and lang2 are ISO language codes. For example, the US English labels are kept in the strings-en-us.xml file.
<note>,
<fig>, and <table> elements).There are two major reasons you may want to use modify the translation files: to modify the existing strings or to translate to a new language.
To modify the generated text for WebHelp transformations, you need to create a DITA-OT extension plugin that uses the dita.xsl.strings extension point. The following procedure is for changing English labels, but you can adapt it for any language:
<plugin id="com.oxygenxml.webhelp.localization">
<require plugin="com.oxygenxml.webhelp.responsive"/>
<feature extension="dita.xsl.strings" file="webhelp-extension-strings.xml"/>
</plugin>
<langlist>
<lang xml:lang="en" filename="strings-en-us.xml"/>
<lang xml:lang="en-us" filename="strings-en-us.xml"/>
</langlist>
@id attribute unchanged
because this is the key used to look up the string. Then replace their values:
<variables>
<variable id="Figure">Fig</variable>
<variable id="Draft comment">ADDRESS THIS DRAFT COMMENT</variable>
</variables>
To add a new language for WebHelp transformations, you need to create a DITA-OT extension plugin that uses the dita.xsl.strings extension point. The following sample procedure is for adding translation files for the Polish language, but you can adapt it for any language:
<plugin id="com.oxygenxml.webhelp.localization">
<require plugin="com.oxygenxml.webhelp.responsive"/>
<feature extension="dita.xsl.strings" file="webhelp-extension-strings.xml"/>
</plugin>
<langlist>
<lang xml:lang="pl" filename="strings-pl-pl.xml"/>
<lang xml:lang="pl-PL" filename="strings-pl-pl.xml"/>
</langlist>
<note>, <fig>, and
<table> elements). Translate the content of each
<variable> element (make sure to leave the @id
attribute unchanged).
<variables>
...
<variable id="webhelp.content" js="true" php="false">Polish word for 'Content'.</variable>
<variable id="webhelp.search" js="true" php="false">Polish word for 'Search'</variable>
...
<variable id="Figure">Polish word for 'Figure'</variable>
<variable id="Table">Polish word for 'Table'</variable>
...
</variables>