Membership level information (including the name, description, and confirmation message) needs special consideration if you want to display your site’s content in multiple languages. The recipe below demonstrates how to translate level information for each of your site’s offered languages.
This works well in conjunction with WPML for multilingual sites.
The Code Recipe
Adding the Recipe to Your Website
You can add this recipe to your site by creating a custom plugin or using the Code Snippets plugin available for free in the WordPress repository. Read this companion article for step-by-step directions on either method.
$pmpro_translated_levels array for each Level ID you need to translate. Any fields available on the level object can be translated, including the
confirmation. You can add a sub array for each locale offered in your multilingual site.
Code Author: Jason
Jason is co-founder of Paid Memberships Pro, the 100% open source membership plugin for WordPress. He has been pushing WordPress to its limits for many years and is an advocate for using WordPress as an application framework to build web sites and apps that go above and beyond the typical blog of CMS site.