WPML XLIFF filter

WPML XLIFF is an XML-based bilingual document format for WordPress. WordPress by itself doesn't support multilingual web site content, and has no localization workflow. Admins of many WordPress-based websites install an inexpensive WordPress plugin called WPML. They can use multilingual content, export selected web site content for translation as WPML XLIFF files, send them to translators (in e-mail etc.), and import the translated files back.

memoQ can handle WPML XLIFF files, so you can localize WordPress websites without extra costs.

memoQ can receive WPML XLIFF files in two ways:

  • Via the CMS API (the file comes directly from WordPress's WPML plugin). The CMS API handles the import.
  • Via manual import (the file comes from someone, for example, in an e-mail). You can just drag the file into a project: memoQ recognizes that it is a special kind of XLIFF, and imports it with the WPML XLIFF filter.

memoQ does not import the target text from WPML XLIFF files. This is mainly because:

  • The target text may not be related to the source at all. For example, it may just be "Spanish version coming soon".
  • The structure of WPML XLIFFs is not entirely correct: One source segment in the file may contain many real segments. memoQ handles this during import, but then you would have to align the source and target segments manually.

How to get here

  1. Start importing a WPML XLIFF file.
  2. In the Document import options window, select theWPML XLIFF files, and click Change filter and configuration.
  3. The Document import settings window appears. From the Filter dropdown, choose WordPress (WPML) filter.

    Document import settings window showing the WPML XLIFF filter selected. In the Shortcode interpretation region, there is a text field with a regular expression.

What can you do?

Tell memoQ what to handle as a shortcode

WordPress shortcodes are codes embedded into your web content. They let you use lightweight programming to change how your web content appears: You can write code that defines what happens to text you put between shortcodes.

To tell memoQ what are your shortcodes in the imported documents: I, write a regex that matches all your shortcodes (and nothing else).

WordPress shortcodes are always in square brackets. The filter's default regex (.*) in the Shortcode interpretation section supposes that anything in square brackets is a shortcode. Change this regex as needed. For example, if all your shortcode names consist of the word "shortcode", an underscore, and a 3-digit number, enter shortcode_\d{3} into the text box. If shortcodes in your document all end with "abc", use .*abc as your regex.

To learn more about shortcodes: See WordPress's developer documentation.

To learn more about regexes: See the Docs article about regular expressions.

When you finish

To confirm the settings, and return to the Document import options window: Click OK.

To return the Document import options window, and not change the filter settings: Click Cancel.

In the Document import options window: Click OK again to start importing the documents.