Translate WooCommerce PDF Invoices with WPML

In this article, we will see how the WooCommerce PDF Invoices, Packing Slips, Delivery Notes & Shipping Label plugin can be translated into your desired language via WPML. Documents such as invoice, packing slip, shipping label etc. are the major deliverables of an e-commerce environment. Being able to obtain these deliverables in our desired language is definitely an added advantage for both the store owner as well as the customer.

Once the WPML plugin is installed and activated, you need to first configure it for the desired languages. Once the languages have been set up, navigate to WPML > String Translations as shown below for customizations w.r.t the plugin:

WPML-String Translation

The String Translation page opens up. From the Select strings with domain drop down choose wf-woocommerce-packing-list which is the domain pertaining to the WooCommerce PDF Invoices, Packing Slips, Delivery Notes & Shipping Label Plugin.

WooCommerce PDF Invoices, Packing Slips, Delivery Notes & Shipping Label-WPML String Translation
WooCommerce PDF Invoices, Packing Slips, Delivery Notes & Shipping Label-WPML String Translation

On selecting wf-woocommerce-packing-list from the Select strings within domain drop-down, all the strings pertaining to the plugin will be loaded on the screen. Conversely, an individual string can be searched from the search box for translating it separately. For instance, we will go through the steps involved in translating the string ‘Shipping Address:’.

  1. Click on the translations link, enter the translation text in respective languages as shown below:
    WooCommerce PDF Invoices, Packing Slips, Delivery Notes & Shipping Label-Translating Shipping Address
    WooCommerce PDF Invoices, Packing Slips, Delivery Notes & Shipping Label-Translating Shipping Address
  2. Note: Here, the translations can be given for three languages; Danish (da), French (fr) and German (de) since these are the only languages configured in WPML. All the languages configured in WPML will be listed here for the translation.
  3. Enter the translated text in the field provided. For example, Afsendelsesadresse: is entered for danish translation. Adresse de livraison: is entered for french translation and Lieferanschrift: is entered for german translation. This means that instead of Shipping Address: text, the concerned translated text will be displayed in thePDF Invoices, Packing Slips, Delivery Notes & Shipping Label plugin when switched to respective languages.
  4. Once done, tick the Translation is complete check box.
  5. Click on Save button.

Now switch the language option in your website to see the changes. Switch the language to Danish and print the invoice, you can see that the Shipping Address on the invoice will be as shown below:

WooCommerce PDF Invoice-Shipping Address translated to danish
WooCommerce PDF Invoice-Shipping Address translated to danish

Note:

  1. It would be advisable if the profile language is switched to the desired language for better results.
  2. If the strings that you wish to be translated are not listed in the selected domain, just go to WPML > Themes and plugin localization. From the screen, navigate to the section Strings in the plugins. Select the WooCommerce PDF Invoices, Packing Slips, Delivery Notes & Shipping Label plugin from the list and click on Scan selected plugins for strings button as shown below.
    WooCommerce PDF Invoices, Packing Slips, Delivery Notes & Shipping Label-Scan for strings
    WooCommerce PDF Invoices, Packing Slips, Delivery Notes & Shipping Label-Scan for strings

    At the end of the scan, all the strings in the plugin will be auto-populated into the String Translation domain, further to which you can make the necessary translations as mentioned at the beginning of this article.

 

Leave a Reply

Your email address will not be published. Required fields are marked *