Recipient User Language email alert in workflow

How to get the recipient’s language in a visualforce email?

I’m trying to use this property:

language=”{!recipient.LanguageLocaleKey}”

But when the email is sent, the recipient object is the context user, and not the user who will receive the email.

Thanks in advance.

Answer

This should work.

<messagingmessaging:emailTemplate subject="{!$Label.subject}" recipientType="Contact"
relatedToType="Account" language="{!recipient.language__c}">
<messaging:plainTextEmailBody>
{!$Label.greeting}
</messaging:plainTextEmailBody>
</messaging:emailTemplate>

Attribution
Source : Link , Question Author : vanderlindo , Answer Author : sfdcFanBoy

Leave a Comment