Import / Export lets you send your content to a translator or a translation agency as a file, and bring the translated file back. It works with two file formats, XLIFF 1.2 and CSV.
Supported file formats
| Format | What it is | Best for |
|---|---|---|
| XLIFF 1.2 | An XML file format that translation tools and agencies know | Working with translation agencies and CAT (computer-assisted translation) tools |
| CSV | Comma-separated values that open in Excel, Google Sheets, or any text editor | Quick review in a spreadsheet and small projects |
Where to find it
Import / Export is a tab of Lang Forge > Tools, so the screen is at Lang Forge > Tools > Import / Export. It has the title “Import / Export Translations” and two cards, Export and Import.
Exporting translations
- Go to Lang Forge > Tools > Import / Export
- In the Export card, choose the Source Language. It is set to your default language when the screen opens
- Choose the Target Language, the language you need translated. The list leaves out the default language
- Choose the Format: XLIFF 1.2 (selected when the screen opens) or CSV
- Click Export
- Lang Forge saves the file in the
langforge-exportsfolder inside your WordPress uploads directory and shows a link with its file name. Click the link to download it. The name islangforge-export-<source>-<target>, then a random 12-character token, then the extension, for examplelangforge-export-en-es-a1b2c3d4e5f6.xliff - Send the file to your translator or agency
The screen has no filters. The file always holds every published post of the translatable post types in the source language. You choose the translatable post types in Lang Forge > Settings, in the Translatable Post Types part of the Content & Notifications card. For each post the file holds the title, the content split into rows (with the HTML tags removed), and the excerpt when the post has one. A row is one block of text: a paragraph, a heading, a list item, or a table cell. A block that holds several lines of text in its own HTML, such as a table, a quote with its cite, or a list in the older format, has one row for each line. Where a translation already exists, its text is filled in next to the original. Otherwise the translation is empty and waits for the translator.
Importing completed translations
- Go to Lang Forge > Tools > Import / Export
- In the Import card, click the File field and choose the translated file. It accepts .xliff, .xlf, and .csv files, up to 5 MB
- Click Import. There is no preview: the file is imported at once
- The screen shows the line “Imported N translations”, or an error message such as “Invalid XLIFF file” or “File too large. Max 5MB allowed.” When the import did not take some rows of the file as they were written, the line is followed by “Some rows of the file need your attention:” and a list. Each item names the page (a link to its edit screen), the row of the file, such as seg-3 or seg-3-1, and what to do: export the file again when a row could not be applied because the page changed after the export; check the page when the tags of a row did not match and the markup was mended; check the links and the bold words of a block that was rebuilt from the original, or of the whole page when its translation did not have the same blocks as the original
- Open your post list, filter by the target language, and check the imported translations
- Review the translations and publish them
What the import does
- Each entry is matched to its original post by the post ID that the export wrote into the file. An entry whose original post does not exist, or whose translation is empty, is skipped
- For each matched post, Lang Forge creates the translation in the target language, or updates the translation that already exists
- A new translation is saved as a draft. A translation that already exists keeps its status, so a published translation stays published, and keeps its author
- For a new translation, a title that is empty or missing in the file is taken from the original post; an existing translation keeps its own title then. If the file holds no translated content text for a post, a new translation gets the content of the original post, and an existing translation keeps its own content
- For a translation that already exists, the import replaces its title with what the file holds (a title that is empty or missing in the file leaves the title as it is) and puts the translated text of each row of the file into its content, block by block. A block of the translation that has the same parts as the block of the original (a list with the same number of items) is kept, with its links and bold words. A row that is empty, or that holds the text the translation has already, changes nothing, so a file sent back untouched leaves the translation as it is. A block that is built differently in the translation (a list with another number of items) cannot take the rows of the file: when the file holds new text for it, that block is rebuilt from the original and the texts of the file are put into it, and the result screen names it. When the file brings new text and the translation does not have the same blocks as the original (another number of blocks with text, or a body of another kind), the texts go into a copy of the original, and the screen names the whole page. A file that brings nothing new leaves the translation as it is, whatever its blocks. A paragraph that the file leaves as it is keeps its links and formatting. The status and the author of the translation stay as they are. The excerpt is replaced only when the file holds a translated excerpt for the post: when it holds none, the excerpt that the translation already has stays as it is
A round trip with an agency
- You export the content as XLIFF, from your default language to the target language, and send the file to the agency
- The agency translates the file in its tool and returns it
- You import the returned file on the same site
- You review the new drafts and publish them, and check the published translations that the file updated
What happens on the Free plan
Import / Export is part of the Pro add-on. Without the add-on, the Import / Export tab of the Tools screen carries a PRO badge and opens a page that says the screen belongs to Lang Forge Pro. Translations are then created in the editor.
Common mistakes to avoid
- Importing a file on another site. Entries are matched by post ID, and another site usually has different posts under the same IDs. Import a file only on the site it was exported from. Do not use this screen to move translations to another site
- Changing the IDs in the file. The translator should change only the translated text. If an ID in the file is altered, the entry is matched to a different post or is skipped
- Expecting every imported translation to wait as a draft. A new translation is a draft, and nothing new is published until you publish it. A translation that was already published stays published, so the text of the file goes live on it at once
> Tip: Because an export also holds the translations that already exist, you can keep an export as a copy of the translated text. The file holds plain text without HTML tags, so it does not keep the formatting of the posts.
[Screenshot: The Import / Export Translations screen with the Export card and the Import card]
—