ERP Core

Translate WP ERP Pro and HR Frontend

WP ERP Pro is not on WordPress.org, so you translate it on your own computer with Poedit. This includes HR Frontend, the employee portal on the front of your site.

In WP ERP Pro 2.0, HR Frontend uses the same language files as the rest of WP ERP Pro. You do not need a separate HR Frontend file.

The examples on this page use German (de_DE). Use the code of your language.

Before you start

  • Translate the free WP ERP plugin first. HR Frontend and the Pro modules also show texts from the free plugin. See Translate the WP ERP Core Plugin.
  • Install Poedit (free) from https://poedit.net/.
  • You need WP-CLI on your computer or server to make the template and the .json files. Ask your host if you are not sure.

Step 1: Make a new template

The template that comes with WP ERP Pro 2.0.0 (erp-pro/languages/erp_pro.pot) is from an older version. Many texts of the new screens are not in it. Make a new template from the plugin files:

wp i18n make-pot wp-content/plugins/erp-pro erp-pro.pot --domain=erp-pro --exclude=node_modules,vendor

This makes erp-pro.pot with all the texts of WP ERP Pro, HR Frontend included.

Step 2: Make a translation from the template

  1. Open Poedit.
  2. Click File → New From POT/PO File.
  3. Open the erp-pro.pot file from Step 1.
  4. Select your language, for example German (Germany).

Step 3: Translate the texts

Select each text in the list and type the translation. To translate HR Frontend first, search for texts that employees see, for example My Leave or Attendance.

Step 4: Save the files with the correct name

Save the file as erp-pro-de_DE.po. Poedit also saves erp-pro-de_DE.mo next to it.

The name must be erp-pro- followed by your language code.

Step 5: Make the files for the new screens

The new screens of WP ERP Pro 2.0 (HR Frontend, Payroll, Attendance, Recruitment, and the other HR modules) need .json files:

wp i18n make-json erp-pro-de_DE.po --no-purge

Keep all the erp-pro-de_DE-….json files. Do not rename them.

Step 6: Upload the files

Upload erp-pro-de_DE.po, erp-pro-de_DE.mo, and all the .json files to:

wp-content/languages/plugins/

A plugin update does not delete files in this folder.

Step 7: Set the site language

Go to Settings → General, select your language in Site Language, and click Save Changes.

Result

Open the HR Frontend page as an employee. The menus and pages show your translation. Texts that come from the free plugin use the translation from the free plugin.

Problems

ProblemCause and fix
The HR Frontend pages stay in English.The .json files are missing. Do Step 5, then upload the files.
Some texts stay in English.The texts are not in your .po file. Make a new template (Step 1). In Poedit, click Translation → Update from POT File, then translate the new texts.
The translation went away after an update.The files were in the erp-pro folder. Move them to wp-content/languages/plugins/.

What changed in 2.0

  • The old page said to translate erp-pro.pot and save the files as erp-hr-frontend.po and erp-hr-frontend.mo. In 2.0, HR Frontend is a new portal. It uses the erp-pro files. Save them as erp-pro-de_DE.po and erp-pro-de_DE.mo.
  • The new screens need .json files.
  • The template in the plugin is out of date. Make a new one (Step 1).

Was this article helpful to you?

How can we help?