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 using WPML.
Once the WPML plugin is installed and activated, you need to first configure it for the required languages. Once the languages have been set up, navigate to WPML > String Translations as shown below for customizations w.r.t the plugin:
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.
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, let us go through the steps involved in translating the string ‘Shipping Address:’.
Click on the translations link, enter the translation text in respective languages as shown below:
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.
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.
Once done, tick the Translation is complete check box.
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:
Note:
- Please ensure that the profile language is switched to the desired language for accurate translation.
- 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.
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.