Multilingual support with WPML

The WooCommerce PDF Invoices & Packing Slips plugin supports multilingual setups using the Professional extension and WPML, although is possible that using only the free version of the PDF plugin to achieve a satisfactory output, see here how.

WPML is a well known and reputable multilingual plugin, and that’s why we choose it for this integration.

How WPML compatibility works? #

After installing both, Professional extension and WPML, you should see some PDF settings having language tabs, for example the Document title:

On this tabs you can define the setting text for each language, which will be respected when generating the actual PDF.

We also offer a multilingual setting that you could see under the settings page Pro tab:

Using this setting you could define in which language the PDF document should be. You can choose one of this options:
  • Order/customer language: the PDF will be generated using the order language, which corresponds to the customer language
  • Site default language: will use the WPML default language as the PDF document language
  • Specific language (choose from the available ones): the PDF will be generated using this selected language

Translating strings in WPML #

WPML comes with two different translation modes:

  • Translate everything: all the site content will be translated automatically for the secondary languages, although it can be reviewed by you
  • Translate some: you decide what to translate, it’s a manually process using the WPML translation editor

If you’re looking for a specific string that needs to be translated, you could find it easily going to WPML > String Translation. From there you could see a list of all the available strings and also search for specific strings.

PDF still showing strings in the wrong language? #

If you’re using the customizer from the Premium Templates extension, or a custom filter hook, sometimes the strings can’t be found by WPML. In this particular situation you need to follow this steps:

  1. Go to WPML > String Translations
  2. Enable “Look for strings while pages are rendered
  3. Create a PDF document
  4. Disable “Look for strings while pages are rendered
  5. Enter translations for the custom strings in WPML > String Translations