With standard WordPress translation files. Pricepep's texts use two text domains, and each has a template (.pot) in the plugin's languages folder. Translate the templates with a tool such as Poedit or a translation plugin, and save the compiled .mo files where updates don't replace them.
Which files do I translate?
| Text domain | Template | Contains |
|---|---|---|
rp_wcdpd | languages/rp_wcdpd.pot | Pricepep's admin pages, settings, messages for customers (such as the coupon errors) and the default labels |
rightpress | languages/rightpress.pot | Texts from the RightPress library Pricepep includes, such as the names of conditions and operators |
Both are in wp-content/plugins/wc-dynamic-pricing-and-discounts/languages/. Name the translations after the text domain and the WordPress language code, for example rp_wcdpd-de_DE.mo and rightpress-de_DE.mo for German.
Where do the translation files go?
Put the .mo files in their own folder in wp-content/languages:
wp-content/languages/wc-dynamic-pricing-and-discounts/rp_wcdpd-de_DE.mo
wp-content/languages/wc-dynamic-pricing-and-discounts/rightpress-de_DE.mo
Pricepep loads this folder first, for the site language in Settings > General in WordPress. wp-content/languages/plugins/ works too, with the same file names. Don't keep your only copy in the plugin's own languages folder: an update replaces the whole plugin folder.
The license and update messages under Pricepep on the Plugins page use a third text domain, rightpress-updates. Their texts are in rp_wcdpd.pot; to show them translated, save a copy of your German rp_wcdpd file as wp-content/languages/plugins/rightpress-updates-de_DE.mo.
Which texts aren't in the templates?
Texts you type in Pricepep are settings, and customers see them exactly as typed: the Title - Public and Description - Public of rules, and the labels and messages on the Promotion tab, such as the You Saved label or the Volume Pricing Table Title. Fields like these get their default text from the translation when Pricepep's settings are first saved; after that, the text in the field is used, so change it there. Pricepep shows one text for all languages; for a shop in several languages, see WPML.
Frequently asked questions
Does Pricepep come with translations?
No. The plugin includes the .pot templates only, and WordPress doesn't download language packs for it because it isn't hosted on WordPress.org.
Will an update delete my translation?
Not if the .mo files are in wp-content/languages/wc-dynamic-pricing-and-discounts/ or wp-content/languages/plugins/. The plugin's own languages folder is replaced with every update.
Why are my discount titles still in English?
Title - Public, Description - Public and the labels on the Promotion tab are texts you type in the settings, not translations. Change them in the rule or on the Promotion tab.