CSV Import / Export

Using the CSV 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.

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 CSV 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.

📘

Importing Source Phrases

If you are importing only source language phrases without translations, you should NOT have a language code specified in the target-language column. You still need to have target-language in the header row, but nothing in the rows beneath it.

Otherwise, you will get an error saying that the language code is incorrect.

Exporting Phrases or Glossary Terms

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

  1. Select CSV 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

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

  • General Requirements:

    • All CSV files must be comma delimited (semicolon is not supported)
    • Strings with spaces must have double quotes around them.
  • Header Row:

    • 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,url,source-language,target-language,phraseKey
    • all field names above are REQUIRED (except for url and phraseKey), 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.
  • Context:

    • The description value is used to add context to the phrase for your translators.
phrase,translation,description,phraseId,labels,url,source-language,target-language,phraseKey
"This is the source phrase","Esta es la frase fuente",,,,,en,es,my-phrase-key
"another phrase","otra frase","some context",56bb755f9cf47fbd0ebb8677,mylabel,example.com/testing,en,es,another-key

View of the CSV file in table format:

2650

📘

phraseKeys Only Used in Mobile Apps

phraseKeys can only be used in Mobile App projects. If there is a phraseKey in a file imported into a Website project, that phrase will be ignored and won't be added to your Localize dashboard.

Troubleshooting

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

  • If you see the following error , you may be missing a comma in one of your lines, or have an extra one:
    • "Invalid closing quote at line 1; found "\"" instead of delimiter ","
  • 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".