PO Import / Export

Using the PO 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 PO 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 PO 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 PO file format.

The following header data is required for the file:

  • Project-Id-Version: 1\n
  • MIME-Version: 1.0\n
  • Content-Type: text/plain; charset=UTF-8\n
  • Content-Transfer-Encoding: 8bit\n
  • #source-language: en, target-language: es

The following data is required for each phrase:

  • msgid: "some source language string"

The following data is optional for each phrase:

  • #phraseID: this internal ID will be seen in any files exported from Localize
  • #Some context string: a string which provides context for your translators
  • #Labels: An 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.
  • msgstr: "some target language translation"
    • Optionally you could have multiple msgstr lines for one msgid.
Project-Id-Version: 1
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
#source-language: en, target-language: es
#phraseID: 5c6f2a29ff0975613d50ab73
#Translator: google
msgid "We recommend that you oil and wax your board about every month, or when it seems dry to the touch, depending on usage."
msgstr "Recomendamos que lubrique y encere su tabla aproximadamente cada mes, o cuando parezca seco al tacto, dependiendo del uso."
#phraseID: 5c6f29c0ff0975613d4f55c4
#Translator: google
#Labels: auto-approve, lzm-meta-description, meta-description
msgid "Beautiful wood products, crafted from locally sourced trees"
msgstr "Hermosos productos de madera, 
msgstr "elaborados a partir de "
msgstr "árboles de origen local."
#This is a product made of wood Translator: web
msgid "Cutting Board Care"
msgstr "Cuidado de la tabla de cortar"

📘

Header content not preserved

Note that we do not preserve the header contents from an imported file upon export. We will always export a generic header.


Troubleshooting

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

📘

Importing New Phrases

Currently, the phraseID field is required and must be a valid Localize internal phraseID.
Therefore, you must first export a PO file from the Localize dashboard before you can work on the translations outside of the Localize dashboard.

At some point in the future phraseID may not be required when importing new phrases.