cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Sending multilingual emails

Sending multilingual emails

 

Introduction

Often there is a need to send emails out to users which have multiple languages. Unfortunately, IdentityIQ's default email templates do not support language currently. However, there are still a number of options at your disposal to solve this problem:

 

Option 1:  All languages in single email

You can put all languages in one email template, and have an HTML section which allows you to "jump" to the correct language setting. 

 

Option 2: Leverage velocity to render correct language

If your email template has the context of the identity who is being sent the notification, you could use an Identity attribute to render the correct language. 

 

For example, if you had an identity attribute called "preferredLanguage", you could use this to key the correct language. 

 

#set ( $language = $certifier.preferredLanguage )

 

#if ( $language == "de" )

    Hallo! Mein Name ist $certifier.displayName

 

#elseif ( $language == "fr" )

    Bonjour! Mon nom est $certifier.displayName

 

#elseif( $language == "es" )

    ¡Hola! Mi nombre es $certifier.displayName

 

#else

    Hello! My name is $certifier.displayName

 

#end

 

if "preferredLanguage" was set to "de" then we could expect a certifier's email to look something like this:

 

Hallo! Mein Name ist Robert Brown

 

Option 3: Send email based on language

If you have API control, you have control over selecting and sending the correct email template yourself.  For example:

String emailTemplateName = "Notification Template";

String language = identity.getAttribute( "preferredLanguage" );

 

EmailTemplate emailTemplate = context.getEmailTemplate( emailTemplateName + " - " + language );

 

EmailOptions emailOptions = new EmailOptions();

emailOptions.setTo( identity.getEmail() );

 

context.sendEmailNotification( emailTemplate, emailOptions );

 

Option 4: Use custom email notifier

In IdentityIQ 6.1, we added the option called emailNotifierClass to the SystemConfiguration.  You can write your own emailNotifierClass which can re-translate the templates. As an example:

<Configuration name="SystemConfiguration">

  <Attributes>

    <Map>

...

      <entry key="emailNotifierClass" value="sailpoint.example.MultilingualNotificationSender" />

 

The custom emailNotifier code might look something like this:

package sailpoint.example;

 

public class MultilingualNotificationSender implements EmailNotifier {

 

  public void sendEmailNotification( SailPointContext context, EmailTemplate template, EmailOptions options )

    throws GeneralException, EmailException {

 

  // Step 1: Derive email addresses

  List<String> emails = template.getTo();

 

  // Step 2: Process each each email individually, because language can vary

  for( String email : emails ) {

 

    // Step 3:  Get the language for this person

   String language = getIdentityLanguageFromEmail ( email );

 

    // Step 4:  Get the correct email template based on the language

    EmailTemplate selectedTemplate = selectNewTemplate ( template, language );

 

    // Step 5: We send an email to them with the correct language

    sendEmail( selectedTemplate, email );

  

    }

  }

}

Attachments
Version history
Revision #:
4 of 4
Last update:
‎May 17, 2026 01:29 AM
Updated by: