Though MemberPress doesn't support multilingual sites out of the box and doesn't provide an official integration with WPML, this doesn’t mean you can’t have a multilingual site.
This document will show you how to translate your custom login page, as an example of translating MemberPress pages.
Creating and Translating Custom Pages
The best way to translate MemberPress pages is to manually create custom pages and add MemberPress elements using shortcodes.
Further, translate these pages with the WMPL translation editor. In addition, you'll need to translate your forms by translating MemberPress strings.
To start, you'll need to create a custom login page in English and translate it into another language. Naturally, you can apply the same process to translate the page into additional languages you might need.Â
Firstly, to create a custom login page in multiple languages, please follow these steps:
- Create a new page in WordPress in your primary language;
- Next, add the MemberPress login form to that page using the following shortcode:
[mepr-login-form use_redirect="true"]
- Design the page any way you want (for example using a page builder).
Translating Custom Pages With WPML
Next, you should translate the custom page you previously created. Add translation for languages you need, and then translate the content using the WPML editor.
Start by adding a version of your custom login page for one additional language, and translating it:
- Navigate to Dashboard > Pages > All Pages, and find your custom page. On the right side, you will see a column for each available language on your site. To create a version of this page in the desired language, click on the + icon in the designated column.
- This will open a WPML translation editor, where you can translate all your content.
- Once you translate the entire content of your page, the bottom bar will show 100%. Click the Complete button, at the bottom right corner to finalize translations.
This will result in a login page being available in two languages. You can repeat the process above for other languages if needed.Â
Now, change the language in the WPML language switcher to check the translated version of your page on the front end. However, you'll notice that your login form is still displayed in your primary language, though the page is translated.
Unfortunately, there will be no option for you to translate the MemberPress form in the translation editor.
Thus, this remaining issue needs to be solved by translating individual MemberPress Plugin strings using WPML.
Translate MemberPress Strings With WPML
Strings are individual pieces of text used by plugins to display labels, messages, etc. WPML allows you to translate the MemberPress plugin strings, so your forms would be properly translated on custom pages.
Now, to translate the strings of your login form or any other form, follow these steps:
- Navigate to WPML > String Translation.
- Search the term you need. As an example, search for “Username or E-mail”, to find the label used for the username/e-mail field.
- You can also narrow your search by selecting the “memberpress” group as shown in the screenshot.
- Once you find the string you want, click the + icon to add the translation. This works the same when translating pages.
- Now add the string translation to the appropriate field.
- Repeat steps 2 to 5 for all strings.
Finally, once you translate all strings in the form, the form should be properly displayed on your translated page.
Translate Other MemberPress Pages
Similarly to the above-described process of translating the login page, you can translate any other MemberPress page. For example, you could translate custom membership registration pages, custom Account pages, or other pages created with MemberPress shortcodes.
Furthermore, if you encounter issues translating any MemberPress page, or you find strings that cannot be translated, please contact support.