Exporting and importing translation files

In the process of the translation of a template, two types of translation files are involved: Portable Object (.po) files and a Portable Object Template (.pot) file. These are standardized file types following the gettext format.

This topic explains how to export the .pot file and how to import a .po file.

Tip: Translation tools are capable of combining .pot files. Combining .pot files may also result in .po files that contain translations for entries in multiple templates. This can be an interesting feature, especially when there are multiple templates in a project, as this eliminates the need to maintain individual .po files for each template.

For information about the translation process, see Translating templates.

Exporting a file for translation (.pot)

A .pot file holds a list of texts in the base language. In OL Connect this is the language in which the template was originally written. The file contains the entries in the Translation pane, including any comments.

Once all translatable elements in a template are tagged (see Tagging elements for translation), you can create the .pot file:

  1. Click the Export button on the toolbar of the Translations pane.

  2. Specify the name and select a folder for the .pot file.

Importing translations (.po)

A .po file holds translated texts for one language. PO files can be imported into the template file or used remotely.

Importing a .po file

Importing a .po file file is easy: drag & drop or copy & paste the file from the file system to the Translations folder in the Resources pane.
Alternatively, right-click the Translations folder in the Resources pane and select New Translation > PO files...

You could also download a remote .po file that is being used in the template. Expand the Translations folder on the Resources pane. Then right-click the .rpo file and select Download Resource.

Editing an imported .po file

When you double-click a .po file in the Translations folder it will be opened in the text editor of the Designer, where you can read and edit it. If you are working with a translator or translating agency, remember to send them a copy of the modified .po file to keep the .po files in sync.

Updating an imported .po file

OL Connect Designer monitors the .po file on disk (in the folder from which it was last imported) for changes. When a .po file on disk has changed, the respective .po file in the template gets a small asterisk behind its name. Right-click the file in the Translations folder and select Update from the contextual menu to import the latest changes.

Using a remote .po file

In order to use a remote .po file, you must add the URL to the Translations folder on the Resources pane.

  1. Right-click the Translations folder on the Resources pane, and select New Translation > New Remote PO file.

  2. Enter a name for the file as it appears in the Translations folder. For better management, it's best to use the same file name as the remote resource.

  3. Enter the URL for the remote .po file.
    If the file is located on an external web server, this must be a full URL, including the http:// or https:// prefix, domain name, path and file name.
    If the file is located on your network you can click the Browse button or enter the path and file name manually.

    The complete syntax with the "file" protocol is: file://<host>/<path>

    If the host is "localhost", it can be omitted, resulting in: file:///<path>

    Example: file:///c:/resources/translations/de-DE.po.

    If the file is located on another server in your network, the path must contain five slashes after "file:".

    Note: Mapped network drives are usually not accessible to the server. Use a UNC path instead (e.g. file://///myserver/myfolder/file.txt).

To change the url to a remote file that is currently being used in the template, expand the Translations folder on the Resources pane, then right-click the .rpo file and select Properties....