Translate() public method

public Translate ( string reference ) : string
reference string
return string
 public override string Process(Report report)
 {
     ReportOutput output = report.OutputToExecute;
     if (string.IsNullOrEmpty(output.FolderPath)) throw new Exception("The output folder path is not specified in the report output.");
     if (string.IsNullOrEmpty(output.FileName)) throw new Exception("The file name is not specified in the report output.");
     output.Information = report.Translate("Report result generated in '{0}'", report.DisplayResultFilePath);
     return string.Format("Report result generated in '{0}'", report.DisplayResultFilePath);
 }
        public override string Process(Report report)
        {
            ReportOutput output = report.OutputToExecute;

            if (string.IsNullOrEmpty(output.EmailTo)) throw new Exception("No email address has been specified in the report output.");

            MailMessage message = new MailMessage();
            message.From = new MailAddress(Helper.IfNullOrEmpty(output.EmailFrom, SenderEmail));
            AddEmailAddresses(message.To, output.EmailTo);
            AddEmailAddresses(message.CC, output.EmailCC);
            AddEmailAddresses(message.Bcc, output.EmailBCC);
            AddEmailAddresses(message.ReplyToList, Helper.IfNullOrEmpty(output.EmailReplyTo,ReplyTo));
            message.Subject = Helper.IfNullOrEmpty(output.EmailSubject, report.ExecutionName);
            if (output.EmailHtmlBody)
            {
                message.Body = File.ReadAllText(report.ResultFilePath);
                message.IsBodyHtml = true;
            }
            else if (output.EmailMessagesInBody)
            {
                message.Body = string.Format("Execution messages for report '{0}':\r\n\r\n{1}", report.FilePath, report.ExecutionMessages);
            }
            else
            {
                if (output.EmailMessagesInBody) message.Body = string.Format("Execution messages for report '{0}':\r\n\r\n{1}", report.FilePath, report.ExecutionMessages);
                else message.Body = Helper.IfNullOrEmpty(output.EmailBody, report.Translate("Please find the report '{0}' in attachment.", report.ExecutionView.Name));

                message.Attachments.Add(new Attachment(report.ResultFilePath));
            }

            //Attach image files
            foreach (string path in report.ExecutionAttachedFiles)
            {
                message.Attachments.Add(new Attachment(path));
            }

            foreach (ReportModel model in report.Models)
            {
                foreach (ResultPage page in model.Pages)
                {
                    if (model.HasSerie && File.Exists(page.ChartPath)) message.Attachments.Add(new Attachment(page.ChartPath));
                }
            }

            //Attachments options
            if (output.EmailSkipAttachments)
            {
                message.Attachments.Clear();
            }
            else if (output.EmailZipAttachments)
            {
                using (ZipFile zip = new ZipFile())
                {
                    if (!string.IsNullOrEmpty(output.EmailZipPassword)) zip.Password = output.EmailZipPassword;
                    foreach (var attachement in message.Attachments) zip.AddFile(Path.Combine(Path.GetDirectoryName(report.ResultFilePath), attachement.Name), ".");
                    string zipName = Path.Combine(Path.GetDirectoryName(report.ResultFilePath), Path.GetFileNameWithoutExtension(report.ResultFilePath) + ".zip");
                    zip.Save(zipName);
                    message.Attachments.Clear();
                    message.Attachments.Add(new Attachment(zipName));
                    message.Attachments[0].Name = report.ExecutionName + ".zip";
                }
            }
            SmtpClient client = SmtpClient;
            client.Send(message);
            output.Information = report.Translate("Email sent to '{0}'", output.EmailTo);
            return string.Format("Email sent to '{0}'", output.EmailTo);
        }