A Cozmoslabs Product
Documentation / Developer Knowledge Base / Email / Different emails for different languages with WPML

Different emails for different languages with WPML

For you to send personalized emails for each language after user registration, you’ll have to use the Compare shortcode. To activate the Compare shortcode you have to go to Profile Builder -> Settings -> Advanced Settings -> Shortcodes -> Enable Compare shortcode.

That allows you to send different information based on registration language. Before that there are a few steps to follow:

1. Add the `Language` type of field to your registration form. This field will be hidden, but it will save the language that users are registering in.

2. Go to Profile Builder -> User Email Customizer and modify the template you’re interested in to something similar to:

[compare val1="{{wpml_client_lang}}" val2="en_EN" operator="=="]
<h3>Welcome to {{site_name}}!</h3>
Your username is:{{username}}
[compare val1="{{wpml_client_lang}}" val2="ro_RO" operator="=="]
<h3>Bine ati venit la {{site_name}}!</h3>
Numele de utilizator este: {{username}}

This works for both Admin and User Email Customizer.

The Ultimate Membership Bundle

Combine the power of Profile Builder with Paid Member Subscriptions to set up user registration, memberships, and recurring revenue.

Get 25% off with the bundle

Help & Support

We’re here to help you every step of the way.

Open a Support Ticket