Import / Export / Text Import

For backup, sending to translation agencies, using offline tools, etc.

Within the content dashboard, we provide you with an ability to import and export phrases and translations. To import, simply go to the resources tab in your dashboard.

Importing Phrases

Importing your source language phrases into the Localize platform and translation workflow, allows you to invite your translators to add/edit translations or to order professional translations from one of our third party providers directly through our platform.

You can also import phrases and translations that were done outside of Localize. When you upload these translations, your library gets updated. Existing translations will be overwritten, and new translations will be added from the file you upload.

To import, simply go to this link to begin managing resources.

Import compatibility

  • XLIFF
  • JSON
  • YAML
  • CSV
  • PO
  • iOS Strings
  • XML
  • RESX

Import History

If your import fails you can view the error here under Import History, and also see other stats on your successful imports.


Exporting Phrases

Localize detects all the content found in your application. You can export your translations for backup purposes, to send to your translators (who can translate your content using a third party tool) or to delegate the translation process to a translation service of your choice.

To export, simply go to this link to begin managing resources.

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

Export compatibility

  • XLIFF
  • JSON
  • YAML
  • CSV
  • PO
  • iOS Strings
  • XML
  • RESX

If you have more questions or want to suggest a file format contact us.


File Types and Formatting

CSV

A Comma-Separated Values (CSV) file is a delimited text file that uses a comma to separate values.

  • All CSV files must be comma delimited.
  • Strings with spaces must have double quotes around them.
  • The file must include a header row at the top of the file which contain names corresponding to the fields in the file as follows:
    • phrase,translation,description,phraseId,labels,source-language,target-language
      • all field names above are REQUIRED, even if there is no data for some of the fields
      • the field names must be in the order specified
  • Labels:
    • 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.
    • Multiple labels on a single phrase should be separated by spaces in the import file.

Note: The "description" value is used to add "context" to the phrase for your translators.

phrase,translation,description,phraseId,labels,source-language,target-language
"This is the source phrase","Esta es la frase fuente",,,,en,es
"another phrase","otra frase","some context",56bb755f9cf47fbd0ebb8677,mylabel,en,es

View of the CSV file in table format:

Possible Errors

  • If you see errors such as "Invalid closing quote at line 1; found "\"" instead of delimiter "," you may be missing a comma in one of your lines, or have an extra one.
  • If you see the following error, you may not have all of the proper columns and/or header field names: Incorrect source language at row with phrase "phrase".

XML

XML String Resource files.

<?xml version = "1.0" encoding="UTF-8"?>
<!-- Generated by Localizejs.com App Localization -->
<resources>
    <source-language>en</source-language>
    <target-language>es</target-language>
    <string name="This is the source phrase">Esta es la frase fuente</string>
</resources>

YAML

For YAML files, the import/export tools assume one language per file.

  • YAML is currently the only file format that Localize supports with key: value pairs for phrases.
  • Exporting a YAML file will preserve the key: value structure which was previously imported.
  • Keys can also be nested.
  • The phrase key will be visible within the phrases listing, and in the information panel for a phrase.
en:
  welcome: Hello
  signup: Sign up
  contact:
    email: Email address
    phone: 555-123-4567

XLIFF

XLIFF is a format that's used to exchange data between participants in a translation project. This special format enables translators to concentrate on the text to be translated, without worrying about text layout.

<?xml version = "1.0" encoding="UTF-8"?>
<xliff version="1.2">
<file original="main" source-language="en" target-language="es">
<head></head>
<body>
  <trans-unit>
    <source xml:lang="en">This is the source phrase.</source>
    <target xml:lang="es">Esta es la frase fuente.</target>
  </trans-unit>
</body>
</file>
</xliff>

JSON

The formatting in the JSON file is very specific. Use the following sample for guidance.
The JSON parser expects an array of Objects in the "dictionary" key.

This file format does not support key:value pairs for source:target language content. Instead, you supply the source language phrase followed by its translation in the "value" key.

The following data is optional for each phrase:

  • context (a string which provides context for your translators)
  • labels: An array 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.
  • the "value" key and its actual value
    • If present, this is the translation of the source text
    • If no translation is available, use empty {}
{
  "sourceLanguage": "en",
  "targetLanguage": "es",
  "dictionary": [
    {
      "context": "this is context one",
      "labels": ["label1", "label2"],
      "translation": {
        "We’re happy that we chose Localize for our localization efforts!": {
          "value": "¡Estamos contentos de haber elegido Localizar para nuestros esfuerzos de localización!"
        }
      }
    },
    {
      "context": "this is context two",
      "labels": ["label3"],
      "translation": {
        "We’ve been able to add new phrases and have them translated.": {
          "value": ""
        }
      }
    },
    {
      "translation": {
        "Many people like to drive through the canyons to view the natural beauty of the space.": {
          "value": "A mucha gente le gusta conducir por los cañones para ver la belleza natural del espacio."
        }
      }
    }
  ]
}

Text Import

Localize will automatically import content on your website. However, manually importing phrases can be useful for translating content before it's live on your website.

To manually import phrases in text or HTML format, navigate to Phrases > Resources > Quickstart > Text Import. You will see the following screen.

Security Warning

Do not copy and paste text from an untrusted source into the box below. Malicious Javascript contained in your submission may compromise the security of your account. Do not proceed if you do not accept and understand this security advisory.

You can import plain text phrases separated by line breaks, or raw HTML.

  1. Select the Text or HTML choice.
    a. If pasting text: phrases should be separated by line break (inline HTML allowed)
    b. If pasting HTML: phrases will be extracted from the HTML
  2. Paste in the text or HTML
  3. Select Add Phrases
  4. A pop-up dialog will be seen showing whether the import was successful or not.
    a. Note: this type of import will not show up in the Import History page.
  5. To view the imported phrases, go to your Pending bin.

Supported Browsers

The Text Import feature has been verified to work in the latest versions following browsers:

  • Windows: Chrome, Firefox
  • Macintosh: Chrome, Firefox, Safari

It does NOT work in the following browsers:

  • Windows: Internet Explorer, Edge

Updated 10 days ago

Import / Export / Text Import


For backup, sending to translation agencies, using offline tools, etc.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.