Localizing XML Refactoring Operations

Oxygen XML Developer plugin includes localization support for the XML refactoring operations.

The translation keys for the built-in refactoring operations are located in [OXYGEN_INSTALL_DIR]/refactoring/i18n/translation.xml.

The localization support is also available for custom refactoring operations. The following information can be translated:
  • The operation name, description, and category.
  • The description of the parameters element.
  • The label, description, and possibleValues for each parameter.
Translated refactoring information uses the following form:
Oxygen XML Developer plugin scans the following locations to find the translation.xml files that are used to load the translation keys:
  • A refactoring/i18n folder, created inside a directory that is associated to a customized framework.
  • A i18n folder, created inside a directory that is associated to a customized framework.
  • An i18n folder inside any specified folder. In this case, you need to open the Preferences dialog box , go to XML > XML Refactoring, and specify the folder in the Load additional refactoring operations from text box.
  • The refactoring/i18n folder from the Oxygen XML Developer plugin installation directory ([OXYGEN_INSTALL_DIR]/refactoring/i18n).
Example: Refactoring Operation Descriptor File with i18n Support
<?xml version="1.0" encoding="UTF-8"?>

    xmlns="http://www.oxygenxml.com/ns/xmlRefactoring" id="remove_text_content" 
    <script type="XQUERY_UPDATE" href="remove_text_content.xq"/>
        <parameter label="${i18n(Element_name)}" name="element_localName" 
                <value default="true" name="value1">${i18n(value_1)}</value>
                <value name="value2">${i18n(value_2)}</value>