How to Localize & Translate PickingPal (Plugin)

May 8, 2024
pickingpal

Want to translate PickingPal into your local language? Here’s how to use the included .pot file to create the needed translation files.

Step 1: Download & Install Poedit (Translation Editor)

Poedit is an easy-to-use translation editor.

Download, install, and then run Poedit on your computer or laptop.

Step 2: Create New Translation

When Poedit opens, select “create new translation from POT template”

Tip: Before running Poedit, locate the woocommerce-pickingpal.pot file from the \i18n\languages folder within the PickingPal directory, and download to a local folder.

Locate woocommerce-pickingpal.pot, select it, and choose Open

In the Translation Language dialog, choose the Language of Translation from the dropdown list.

For each Source Text listed, create the proper translation for your chosen language.

Select the Source Text from the list, click in the Translation window and enter the translated word.

Repeat the process until you’ve translated all the words from the Source Text section that you would like to translate.

Click File > Save As, then save the PO file with the following naming convention:

woocommerce-pickingpal-xx_XX.po (where xx_XX) is the correct language identifier for your selected language. Poedit will set this value initially as the file name, so before saving the file, add in “woocommerce-pickingpal-” as prefix.

In the example above, we’re creating a translation file for Czech (Czech Republic), so the language extension is preset as “cs_CZ”. The resulting file name will be:

woocommerce-pickingpal-cs_CZ.po

Once Poedit saves the file, it will also generate a corresponding MO file, so you will see two new files in the folder, in addition to the original POT file.

Resulting Files:

  • woocommerce-pickingpal-cs_CZ.mo
  • woocommerce-pickingpal-cs_CZ.po

Step 3: Upload Language Translation Files

Using FTP/SFTP or an alternate method, upload the MO & PO files from the step above to the following folder on your server:

/wp-content/languages/plugins

Note: Be sure you have switched to the “plugins” folder under “languages”. This is where WordPress plugins read translation files from. If you place them under the wrong folder, the translations will not work.

Step 4: Finished!

Go into the PickingPal main screen, and you should now see the translated values throughout the PickingPal interface & documents.

Example: