Using custom translations

Contributing #

If translations for your language are incomplete or missing, the best way to contribute is to add them via the WordPress translation interface.

Email us at support at wpovernight.com, so we can add you as a translator. This way, everybody can benefit from your work.

Custom translations #

Some shops/configurations may require custom translations, and you can override the default translations that come with WooCommerce PDF Invoices & Packing Slips by storing them in the WordPress Language folder (wp-content/languages unless overridden with the WP_LANG_DIR constant).

Simply copy the .po and .mo files from:

wp-content/plugins/woocommerce-pdf-invoices-packing-slips/languages/woocommerce-pdf-invoices-packing-slips-LOCALE.po|.mo

to:

wp-content/languages/woocommerce-pdf-invoices-packing-slips/woocommerce-pdf-invoices-packing-slips-LOCALE.po|.mo

You can alter the translations by opening them in Poedit. You can also use the plugin Loco Translate.

If you think your translations/modifications are useful for other people, send them to us at support at wpovernight.com and we’ll include them in the official release!

For the translations for the Premium Templates pack, use:

wp-content/plugins/woocommerce-pdf-ips-templates/languages/wpo_wcpdf_templates-LOCALE.po|.mo

and for the Professional extension:

wp-content/plugins/woocommerce-pdf-ips-pro/languages/wpo_wcpdf_pro-LOCALE.po|.mo

Creating a new translation #

To create a create a new translation, you can install the plugin Loco Translate – this plugin has an intuitive interface and lets you add new translations with ease.

If you want full control over the translation files, you can use POEdit:

  • Download POEdit
  • Open POEdit
  • File > New from POT
  • Open wpo_wcpdf.pot (from woocommerce-pdf-invoices-packing-slips/languages/)
  • A popup will ask you for your language
  • Enter/change the translations
  • Save as wpo_wcpdf-xx_XX.po, where you replace xx_XX with your language code & country code suffix (da_DK, pl_PL, de_DE etc.)
  • Send them to us at support at wpovernight.com, and we’ll include them in the official release!

Important note: Make sure you have properly configured the plurals, as they are used for the filenames: Somehow the settings can’t be copied from the pot. Go to Catalogue > Preferences. Then enter:

nplurals=2; plural=n != 1;