How to Translate PPWP Password Forms with WPML

Password Protect Word Press (PPWP) Lite and Pro work out of the box with the top leading multilingual WordPress plugins such as WPML, Polylang, and Loco Translate. In other words, you can translate our password forms, including headline, description, error message as well as placeholder and button text into the different languages.

In this article, we will show you how to use WPML plugin to translate our password forms covering the content sections, the whole individual pages, and the entire site.

  1. Configure WPML plugin
  2. Translate password protected content
  3. Translate PPWP password forms

Requirements:

1. Configure WPML plugin

When first installing WPML plugins, you will be required to configure some key settings for generating multilingual content. You can follow its setup wizard to set the default and translation languages as well as places where to show the language switcher.

After that, navigate to WPML >> Theme and plugins localization menu from your admin dashboard and select ‘’Translate themes and plugins using WPML’s String Translation only (don’t load .mo files)’’ option in order to translate our password forms.

Partial Password Protection (PCP) form, which covers protected sections in content, is using AJAX to check passwords and store cookies. So you need to enable “Store a language cookie to support language filtering for AJAX” option under WPML >> Languages menu if you want to translate the strings within this form.

2. Translate password protected content

Use WPML plugin to translate your password protected content as normal.

Please keep in mind that when you translate a post, WPML actually generates a new post with a different URL. Clicking on the language switcher will redirect you to the translation version. However, it doesn’t duplicate other post metadata such as your passwords. In other words, if you translate a password protected post by PPWP plugins, you need to protect translated content manually with the same passwords then.

3. Translate PPWP password forms

There are 2 ways to translate our password forms:

  • Use String Translation to scan all the strings within password-protect-page domain and translate them. You need to enable “Track where strings appear on the site” option (at the bottom of the String Translation page) and then load our password form from the frontend.

Please note that it will take a while for WPML to find all of our translatable strings.

  • Download our password-protect-page.pot file and then upload it to your website as image below.

Please make sure to select all our provided strings before adding them.

Then translate a string by searching it under our password-protect-page domain.

We’re using 3 different password forms with a similar design, so you might notice that some strings are duplicate. You distinguish these strings based on their context, where a string displays.

  • PCP refers to the password form displayed when you use our [ppwp] shortcode to protect parts of content.
  • PPF refers to the password form displayed when you protect the whole page by one of the following plugins:
    • PPWP Free
    • PPWP Pro
    • PPWP Groups extension
    • PPWP Access Levels extension
  • SWP refers to the password form displayed when you enable “Sitewide Protection” under our plugins’ setting page.
Lasted updated on August 28, 2020