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:

1
2
3
4
5
6
7
8
9
[compare val1="{{wpml_client_lang}}" val2="en_EN" operator="=="]
<h3>Welcome to {{site_name}}!</h3>
Your username is:{{username}}
[/compare] 
 
[compare val1="{{wpml_client_lang}}" val2="ro_RO" operator="=="]
<h3>Bine ati venit la {{site_name}}!</h3>
Numele de utilizator este: {{username}}
[/compare]

This works for both Admin and User Email Customizer.

Profile Builder Pro

Create beautiful front-end registration and profile forms with custom fields. Setup member directories, custom redirects, cutomize user emails & more using the all in one user management plugin.

Get Profile Builder

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