Translating Strings Using XML

Use the Export tab in Application Administrator to first create an XML file that contains the default English strings. You can then import this file after strings are translated.

Translating SLS and Design Object Strings

Review the following section to learn about exporting SLS and design object strings to XML for translation.

Each SLS / Design string is composed of the following elements in the XML:
  • Key

    Container for each string, including values and tags for all locales.

  • Name

    The key name for each string.

  • Locale

    The locale for each key value.

  • Key Value

    If no override is applied, the text that is shown to users for the specified locale.

  • Override

    A way to customize a string and maintain the provided value. Overrides, if provided, are always shown to users.

  • Tag

    Customizable label for each key value.

Important: Do not modify the structure of the XML file or the values for each category and section. Instead, provide translations as overrides.

The following example shows the XML for a key that has an override for the English value, a translated key value, and an override and tag for that translation.

<Key>
  <Name>Approvals</Name>
  <KeyValue>
    <Locale>en_US</Locale>
    <Value>Approvals</Value>
    <Override>Votes</Override>
  </KeyValue>
  <KeyValue>
    <Locale>fr</Locale>
    <Value>Approbations</Value>
    <Override>Agréments</Override>
  </KeyValue>
  <Tag>First Translation</Tag>
</Key>

To translate SLS and design object strings using XML:

  1. In the Localization | Settings tab, select Allow translation for MLS Runtime Objects and Design Objects if it is not selected already.
  2. Select the Export tab.
  3. Select the SLS / Design type.
  4. Select the locale you want to export.
  5. Select the category of strings to export.
  6. Click Export and save the file.
  7. Open the file of exported strings in an XML or text editor.
  8. Use search and replace to change the <Locale> value for each key.
  9. Add your translation to the override tag for each string.
    Important: For on-demand customers, you must use the <Override> element to override or translate an existing key. You cannot import new keys, and if you attempt an import and you specify a new value for a key, it will be ignored.
  10. In Application Administrator, select the Import tab, and then import the file.

Translating MLS Runtime Object Strings

Review the following section to learn about exporting MLS runtime object strings to XML for translation.

Each string in the XML is a separate runtime object that is identified by uuid, with strings for each locale that you selected at the time of the export.

The following example shows the XML for groups that were exported using the German (de) locale:

<Table dbname="TS_GROUPS" name="Groups" uuid="TS_GROUPS">
<Obj Iden="1" uuid="b41591cd-1f3d-4d7e-bd8e-45e628877607">
<Str Loc="de">CR Administrator</Str></Obj>
<Obj Iden="1" uuid="ea167b8c-e9ea-4196-9727-dfd2f10fd751">
<Str Loc="de">CR Approval Board Members</Str></Obj>
<Obj Iden="1" uuid="f234ddd0-051d-4ab4-95b7-199c64709dd0">
<Str Loc="de">CR Business Analysts</Str></Obj></Table>

The following example shows the XML for projects that were exported using the Root locale:

<Table dbname="TS_PROJECTS" name="Projects" uuid="TS_PROJECTS">
<Obj Iden="1" uuid="ROOTPROJECT"><Str Loc="de">Base Project</Str></Obj>
<Obj Iden="1" uuid="0b87f347-a00c-4359-9c16-625e847bfdab">
<Str Loc="Root">IDM Project</Str></Obj>
<Obj Iden="1" uuid="2ac5ef27-71da-4b07-ab7e-dddbc9c2d8c7">
<Str Loc="Root">Animation Pro</Str></Obj>
<Obj Iden="1" uuid="d1f727e2-9f70-4bee-afd5-bccaf0e71cda">
<Str Loc="Root">Image Builder</Str></Obj></Table>
Important: You cannot change the root value for any MLS runtime object by importing XML—translated values for the root locale are ignored when you import the XML. You can only change root values directly in the object itself. In other words, to change the root value for a project, you must edit the project name in Application Administrator.

The following example shows the XML for reports that were exported using the German (de) locale:

<Table dbname="TS_REPORTS" name="Reports" uuid="TS_REPORTS">
<Obj Iden="1" uuid="7e960b1e-0852-4f51-bd3f-ebb7a21e0749">
<Str Loc="de">Current Item Counts By Functional Area</Str></Obj>
<Obj Iden="1" uuid="1f8889f3-3e40-47c2-8dec-5957e267a4f2">
<Str Loc="de">All Issues I Own</Str></Obj></Table>

The following example shows the XML for values in the Summary fixed-length text field using the Root locale:

<Table dbname="UIM_INCIDENTS" name="Incidents" 
uuid="bf43d3d4-5d37-4e11-a835-6fb15561d668">
<Field dbname="TITLE" name="Summary" uuid="c4c3d236-c5d8-467c-9906-96fb6e4432f6">
<Obj Iden="0" uuid="7aeafc3d-7734-4a81-914b-baab060cb225">
<Str Loc="Root">Upgrade from 4.0 does not work</Str></Obj>
<Obj Iden="0" uuid="34954195-b23a-47b8-ac83-5acbd021917a">
<Str Loc="Root">Lights on my phone don't work.</Str></Obj>
<Obj Iden="0" uuid="69a14215-d3fe-4272-a722-99a89f291da1">
<Str Loc="Root">I forgot my password.</Str></Field></Table>

The Summary field values in this example are available for export to XML because the process app designer selected the Allow translation for value display in relational fields check box on the Summary field in SBM Composer, and then deployed the process app.

To translate MLS runtime object strings using XML:

  1. In the Localization | Settings tab, select Allow translation for MLS Runtime Objects and Design Objects if it is not selected already.
  2. Select the Export tab.
  3. Select the MLS / Runtime type.
  4. Select the locale you want to export.
  5. Select the values to export.
  6. Click Export and save the file.
  7. Open the file of exported strings in an XML or text editor.
  8. Change the Str value for each string you want to translate.
  9. Save your changes to the XML file.
  10. In Application Administrator, select the Import tab, and then import the file.