C.3. Using Strings and Languages

The Mechanical Wizard obtains all strings from TaskML. The language-related section of the TaskML uses the following structure:

<strings>
    <language xml:lang="language-code">
        <string id="String_ID">Sample Text</string>
    </language>
</strings>

The Mechanical Wizard determines which strings to use by matching the Language setting in the Wizard page of the Control Panel to the xml:lang attribute of a language element. If no language element with a matching xml:lang attribute exists, or if no string element with the necessary ID exists, the Mechanical Wizard takes the string from the language element with the xml:lang attribute set to "en-us" (English, United States). If the default English string doesn't exist, the Mechanical Wizard takes the first string with a matching ID or displays the string ID in place of the text.

Recommended Localization Process

This process describes how to localize all strings in a TaskML file:

  1. Open the TaskML file in a text editor.

  2. Copy the section of the file from:

    <language xml:lang="en-us">

    to

    </language>
  3. Paste the copy into the<string> element below the last <language> close tag.

  4. Change the language code from en-us to the code appropriate for the localization.

  5. Localize each <string> element within the new <language> element. String IDs must remain unchanged.

  6. Test the new language by entering the language code in the Language setting in the Wizard page of the Control Panel.

English Customization Process

This process describes how to customize individual English strings with specific information or terminology:

  1. Create a new <language xml:lang="x-foo"> element at the bottom of the <string> element below the last </language> close tag. Set the xml:lang attribute to an arbitrary "x-code" descriptive of the customization (no spaces).

  2. Copy individual <string> elements to customize from the < language xml: lang="en-us"> element to the new <language xml: lang="x-foo"> element. Strings omitted from the new <language> element will be obtained from the <language xml: lang="en-us"> element.

  3. Customize the strings. String IDs must remain unchanged.

  4. Test the customized strings by entering the x-code in the Language setting in the Wizard page of the Control Panel.