You need to sign in to do that
Don't have an account?

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?
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?
It turns out I was just missing a setting: Administer -> Translation Workbench -> Translation Settings -> [language] -> activate, which solved the issue.
All Answers
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.
It turns out I was just missing a setting: Administer -> Translation Workbench -> Translation Settings -> [language] -> activate, which solved the issue.
https://salesforce.stackexchange.com/a/337663/43223 (https://salesforce.stackexchange.com/a/337663/43223" target="_blank)