I want to send an email based on user specified language. For this we created an VF Email Template with custom label:
<messaging:emailTemplate subject="15 Days of Salesforce.com Inactivity - Please Login" recipientType="User" relatedToType="User_Status__c" language="{!recipient.Email_Language__c}">
<messaging:plainTextEmailBody >
<apex:variable var="LastLogin15" value="{!$Label.LastLogin15}"/>
</messaging:plainTextEmailBody>
</messaging:emailTemplate>
In the above code Email_Language__c will hold user language and LastLogin15 is an custom label which has the email content that has to be translated.
Problem: when tested using Visualforce pages this is working fine, but when I test by sending a test email it doesn't display any content. Where am I going wrong?