RESX Import / Export

Using the RESX file format to import/export content

Within the Localize dashboard we provide you with an ability to import and export phrases and translations in various file formats.

You can also import/export Glossary terms.

To see a general explanation of how importing and exporting works in Localize, click here.

📘

UTF-8 File Format

Be sure that you are using the UTF-8 file format when working with the external files you are creating for importing purposes.

Importing Phrases or Glossary Terms

Before importing, make sure your file adheres to the file requirements below.

Navigate to the File Import / Export: Import tab in your dashboard.

  1. Drag-and-drop a file to import into the box, or select a file to import.
  2. Select RESX under File Format.
  3. Select the language you are importing.
  4. Specify the import type: Phrases or Glossary terms
  5. Click the Submit button.
  6. Wait for the file to be uploaded.
  7. Success! View the file details to see how many phrases were created, updated, etc.

Exporting Phrases or Glossary Terms

Navigate to the File Import / Export: Export tab in your dashboard.

  1. Select RESX under File Format.
  2. Select a filter which will determine which phrases get exported:
    a. Published translations
    b. Machine translations
    c. Human translations
    d. No translations
    e. Needs human translations
  3. Select the language you are exporting.
  4. Specify the export type: Phrases or Glossary terms
  5. Click the Export button.
  6. Wait for your download to complete, then close the popup dialog.

📘

Exporting Selected Phrases

Alternatively, you can filter exactly which phrases that you want to export on the Phrases page. Find out how...


File Requirements

The following are the requirements for the RESX file format.

The following header data is required for the file:

  • <?xml version="1.0" encoding="utf-8"?>
  • <root> - the root node
  • <languages> - the languages node specifies the source-language and target-language

The following header data is optional for the file:

  • <schema> - the schema node is optional as seen in the example below

The following data is optional for each <phrase-data> node:

  • <phrase> - string: the source language phrase
  • <translation> - string: the translation of the source language phrase
  • <description> - string: provides context for your translators
  • <phraseId> - string: this internal ID will be seen in any files exported from Localize
  • <labels> - A comma-separated list of strings which are labels to apply to the phrase
  • Note that any pre-existing labels on the phrase will be replaced by the ones in the import file.
  • Any labels added to the phrase in the file being imported will be added to the Localize dashboard.
<?xml version="1.0" encoding="utf-8"?>
<root>
  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xsd:element name="phrase-data">
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element name="phrase" type="xsd:string" minOccurs="0" msdata:Ordinal="0" />
          <xsd:element name="translation" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
          <xsd:element name="description" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
          <xsd:element name="phraseId" type="xsd:string" minOccurs="0" msdata:Ordinal="3" />
          <xsd:element name="labels" type="xsd:string" minOccurs="0" msdata:Ordinal="4" />
        </xsd:sequence>
      </xsd:complexType>
    </xsd:element>
    <xsd:element name="languages">
      <xsd:complexType>
        <xsd:sequence>
          <xsd:attribute name="source-language" type="xsd:string" />
          <xsd:attribute name="target-language" type="xsd:string" />
        </xsd:sequence>
      </xsd:complexType>
    </xsd:element>
  </xsd:schema>
  <languages source-language="en" target-language="es"/>
  <phrase-data>
    <phrase><![CDATA[Here is a new phrase to import via the RESX file format. This phrase doesn't have any translation yet.]]></phrase>
  </phrase-data>
  <phrase-data>
    <phrase><![CDATA[Another new phrase, but this one has a translation and some labels.]]></phrase>
    <translation><![CDATA[Otra frase nueva, pero esta tiene una traducción y algunas etiquetas.]]></translation>
    <labels>resx-import</labels>
  </phrase-data>
  <phrase-data>
    <phrase><![CDATA[A phrase with some context, but no translation.]]></phrase>
    <description>This is the context for this phrase.</description>
  </phrase-data>
</root>

Troubleshooting

If your import fails you can view the error here under Import History.