I have a batch process which I'm creating Emails without a template -
with HTML Body - which there I should style the emails and send them to the contacts.
The emails are built in a way which I go through SObject and I put the Data from this SObject to the email.
For Example :
body += '<p style="font-weight:bold; color:red;">' + Sobject.Field__C + '</p>'; email.setHtmlBody(body);
All of my fields in my SObject are translated in the Translation Workbench, but I don't have any Idea how I can use the lang trick, so that base on a field in this object (Sobject__c.Language__c) I will know which lang to use and retrieve it from the translate.
Like in VF page we can use the language variable in the apex:page tag :
which lang is a variable in the apex controller.
How can I do it on a batch?