Just i want to send email content type multiple language.

<messaging:emailTemplate subject="Confirmation Registration" recipientType="Contact" relatedToType="User" language="{!relatedTo.LanguageLocaleKey}">

new test name


1 Answer 1


First, you'll need a template for each language that your org allows your users to use. Next, you'll need to use Global variables like $User to determine both their LocaleSidKey (controls how numbers, dates and currency are formatted) and their LanguageLocaleKey which is the actual language such as french, german, english, etc that the user speaks/reads. Your templates should be created with the appropriate settings to support the values of the above fields that your organization uses.

Translation workbench will only convert picklist values and field labels for you, not data values. Based on the above User fields, you'll need to set up which template to use for a User. The above fields are both required fields for User. See the object reference to learn more about them. You can also check the Salesforce Help for more on creating email templates to send to users in multi-language orgs.


From the Visualforce Developer Guide under Creating a Visualforce Email Template, you need to be specifying the recipients’ language which for a User, would be their LanguageLocaleKey. The example on the linked page begins as below, note the section of the documentation I've quoted below it :

<messaging:emailTemplate recipientType="Contact"
    subject="Case report for Account: {!relatedTo.name}"
    replyTo="[email protected]">

To translate Visualforce email templates based on recipients’ or related objects’ languages, use the tag's language attribute (valid values: Salesforce supported language keys, for example, “en-US”). The language attribute accepts merge fields from the email template's recipientType and relatedToType attributes. You create custom language fields for use in the merge fields. The Translation Workbench is required to translate email templates. The example uses a merge field to obtain a language attribute for the contact receiving the email.

  • We have multiple language set up for our organization. We want to send email notifications to all the user through approvals and workflows in user specific language depending upon the Locale/Language specified for that user
    – Rajesh Kr.
    Commented Jun 24, 2016 at 7:30
  • The approach that I tried is : -Created VF Email template -Specified language attribute in the email temaplate code -Used custom lable for the body and specified translations for it.
    – Rajesh Kr.
    Commented Jun 24, 2016 at 7:30
  • I tested this by sending an email notification via a workflow to user 'X' with Locale as 'German' and in email Id field for that user I gave my email id so that I will get the test mail. But, I got mail in English language only. Please let me know where I am going wrong ? It is very urgent please give some solution as soon as possible.
    – Rajesh Kr.
    Commented Jun 24, 2016 at 7:30
  • please provide me solution
    – Rajesh Kr.
    Commented Jun 24, 2016 at 7:44
  • 1
    @greenstork Depending on the language, the sentence structure could be completely different written in one language vs the same template created in another language. Languages often do not translate word for word and still make sense.
    – crmprogdev
    Commented Dec 10, 2018 at 19:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .