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

MultiLingual Outbound Message

I am sending some outbound Messages through a trigger, where I have used setHtmlBody method for formulating the body of the Email . I want these outbound messages to be sent in multiple languages as per the country code of the recipient.

I don't want to code this method for each language, Is there any direct method or function which convert  its text as per country code.

Can anyone help me how to achieve this in trigger.


Thanks in advance :)


I believe you should be able to create a Visualforce Email Template, and use the apex:outputText tag (with the rendered attribute) to create multilingual templates. You can then specify the template ID instead of using Messaging.SingleEmailMessage.setHtmlBody. Other than that, you could create a custom object to track the translations, or use Custom Labels to create labels for the various languages.