Skip to main content
Tracey Bowyer 님이 #Data Management에 질문했습니다
We have turned on the translation workbench for our first service center deployment in a foriegn language in germany.  We have translated all our email notifications into german and we now have 2 of each email template, one in english and another in german.

 

The question is, how can we send the appropriate template depending on the language preference of the recipient?  We will have english speaking staff in germany and german speaking support staff in the UK and they could both be receiving information about the same case.

 

Who is the 'Current User' available in the workflow rules?  Would that be the email recipient?  Or would that be the user who created the emal template?

 

If I cant use Current User: Language, then how else can I send the correct email template to the correct recipient?  ie: german or english depending on the language of the recipient?

 

Many thanks,

 

Tracey
답변 5개
  1. 2011년 8월 11일 오전 7:16
    Hi

     

    I achieved this with a Visual Force email template the following code below.

     

    In my example I have a field Case_Language__c which determins the language of the email, and then I have used Custom Lables to provide the relevant tranlsations for each phrase in the email.

     

    This enable you to have one email for as many languages as you set up translations for in the custom lablems.

     

    <messaging:emailTemplate subject="Support" recipientType="User" relatedToType="Case" language="{!CASE(relatedTo.Case_Language__c,'German','DE','English','EN','French','FR','Italian','IT','Danish','da','Spanish','es','Dutch','nl','Finnish','fi','Portuguese','pt','Swedish','sv','Polish','pl','Norweigian','no','EN')}">

            <messaging:htmlEmailBody >

                    <html>

                <body>

                    <STYLE type="text/css">

                        TH {font-size: 11px; font-face: arial;background: #.CCCCCC; border-width: 1;  text-align: center } 

                        TD  {font-size: 11px; font-face: verdana } 

                        TABLE {border: solid #.CCCCCC; border-width: 1}

                        TR {border: solid #.CCCCCC; border-width: 1}

                    </STYLE>

                    <font face="arial" size="2">

                    <br/>

                        <div style="text-align:right;vertical-align:top;"></div>

                        {!$Label.EService_Email_Case_Creation_M_Lang_1}<br/><br/>

                        {!$Label.EService_Email_Case_Creation_M_Lang_2} {!relatedTo.CaseNumber} {!$Label.EService_Email_Case_Creation_M_Lang_3}<br/><br/>

                        {!$Label.EService_Email_Case_Creation_M_Lang_4}<br/><br/>

                        {!$Label.EService_Email_Case_Creation_M_Lang_5}<br/><br/>

                        

                    <br/><br/>

                    

                    {!$Label.EService_Email_Case_Creation_M_Lang_6}<br/><br/>

                    Support Team<br/>

                    <br/><br/> <br/><br/>

                    {!(relatedTo.Subject)}><br/><br/> <br/><br/>

                    {!(relatedTo.Description)}

                    </font>

                    </body>

            </html>

        </messaging:htmlEmailBody> 

    </messaging:emailTemplate>

0/9000