function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Tiia Tirkkonen 18Tiia Tirkkonen 18 

Visualforce email template custom labels translations

I have followed instructions in this knowledge article for sending email templates in recipient's language: 
https://help.salesforce.com/articleView?id=000120154&language=en_US&type=1

I have the language set in the messaging:emailTemplate tag based on recipient's LanguageLocaleKey:
<messaging:emailTemplate subject="Subject" recipientType="User" relatedToType="Object__c" language="{!recipient.LanguageLocaleKey}" >
Component reference for emailTemplate, 'language' attribute: "The language used to display the email template. Valid values: Salesforce.com-supported language keys, for example, "en" or "en-US". Accepts merge fields from recipientType and relatedToType."

.. and included custom labels into the template: {!$Label.test}

There is a translation for the language I'm changing to in my settings that I'm testing for. I've also tried with apex:outputText, apex:outputLabel, etc... and still I keep getting the custom label value in English (default language).

Any ideas what I'm missing?
Best Answer chosen by Tiia Tirkkonen 18
Tiia Tirkkonen 18Tiia Tirkkonen 18
Thanks,

It turns out I was just missing a setting: Administer -> Translation Workbench -> Translation Settings -> [language] -> activate, which solved the issue.

All Answers

Marlon IvanMarlon Ivan
Hi there,
Not sure if you have found the answer to this, if not here it goes. Here is the reason why your text is not being translated https://success.salesforce.com/issues_view?id=a1p30000000SdBfAAK
as the article suggests you should use, for example:
{!relatedTo.User.LanguageLocaleKey}
FYI this accessor WILL NOT WORK WITH TASKS, if you try to copose VF alerts for Tasks you'll need to create a relatioship field to the User object and somehow (workflow) populate the field with the Task Owner's Id then you can use:
{!relatedTo.InsertNewCustomFieldToOwner__r.LanguageLocaleKey}
Hope this helps.
Tiia Tirkkonen 18Tiia Tirkkonen 18
Thanks,

It turns out I was just missing a setting: Administer -> Translation Workbench -> Translation Settings -> [language] -> activate, which solved the issue.
This was selected as the best answer
ajit kumar 120ajit kumar 120
HI This is it
ajit kumar 120ajit kumar 120
This is for case management.I need solution for transalating email content from non-english to english.When i reply back, i should type in english and it should be get translated back in respective language.How it is possible in sfdc? 
Christopher D. EmersonChristopher D. Emerson
This may not be exactly related but FWIW I had similar challenge/frustration recently - namely getting my custom label translations to work for each email using a dynamic language variable in the visualforce component. Here's my solution for my situation in case helpful:
https://salesforce.stackexchange.com/a/337663/43223 (https://salesforce.stackexchange.com/a/337663/43223" target="_blank