WPML and Polylang
WPReturns ships a wpml-config.xml file that WPML and Polylang read. It offers your own texts for translation: return reasons, status labels, the policy line, the menu label and the consent text. Plugin strings come from the wpreturns text domain, and emails are WooCommerce emails.
Available in: Free and Pro.
Settings texts you can translate
Section titled “Settings texts you can translate”wpml-config.xml registers these settings as admin texts.
| Option | What it holds |
|---|---|
_ddwcwr_my_account_endpoint_title | The My Account menu label (“Returns” by default) |
_ddwcwr_policy_text | Your own return policy line if you wrote one |
_ddwcwr_withdrawal_digital_consent_text | The Article 16(m) consent checkbox text |
_ddwcwr_reasons > label | The label of every return reason |
_ddwcwr_statuses > label | The label of every status, built-in and custom |
Translate them with WPML
Section titled “Translate them with WPML”- First save your reasons, statuses and policy text in WPReturns in your default language.
- Go to WPML > String Translation.
- Search the admin texts for the option names above such as
_ddwcwr_reasons. - Translate each label and save.
If an option does not show, open the page in your default language once so WPML can pick it up.
Translate them with Polylang
Section titled “Translate them with Polylang”Polylang reads wpml-config.xml too. Go to Languages > Translations and search for the reason or status labels. Translate each string and save.
Plugin interface strings
Section titled “Plugin interface strings”Buttons, form labels and messages use the wpreturns text domain. A wpreturns.pot file ships in the plugin’s i18n folder. Translate them with WPML String Translation, Loco Translate or a .po file in wp-content/languages/plugins/.
Emails
Section titled “Emails”Every WPReturns email is a WooCommerce email with its subject, heading and message in WooCommerce > Settings > Emails. Translate them the same way you translate other WooCommerce emails in your setup. WPReturns switches to the customer’s locale while it builds each email.
Portal and withdrawal pages
Section titled “Portal and withdrawal pages”Create a translated copy of each page and keep the shortcode in it:
- the returns portal page with
[ddwcwr_returns_portal] - the withdrawal page with
[ddwcwr_withdrawal_form]
The forms work on any page that holds the shortcode. Links in emails, the footer and checkout point to the page saved in settings.
RTL languages
Section titled “RTL languages”The customer screens support right-to-left languages such as Arabic and Hebrew.