PO Import / Export for Web

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.

Importing / Exporting

To see a general explanation of how importing and exporting works in Localize, click here. Be sure to adhere to the file requirements below so that Localize will be able to successfully read your files.

File Requirements

🚧

UTF-8 Character Encoding

Be sure that you are using the UTF-8 character encoding when working with the external files you are creating for importing purposes, so that special characters like accents are encoded properly.

The following are the requirements for the PO file format.

The following header data is required for the file:

  • 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

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 will see a message on screen after the failure occurs. Or 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.


Did this page help you?