我想向用户发送一封本地化的电子邮件,但从资源文件中检索到的文本似乎是基于我的文化。
SmtpClient client = new SmtpClient();
client.Host = "xxx.xxx.xxx";
client.Credentials = new NetworkCredential("name", "password");
MailMessage mm = new MailMessage();
mm.Sender = new MailAddress("xxx@xxx.com");
mm.From = new MailAddress("xxx@xxx.com");
mm.To.Add(new MailAddress(email));
mm.Subject = Localization.EmailUserActiveTitle;
mm.Body = "<div><h3>" + Localization.EmailUserActiveBodyPart1 + "</h3></div></br>" +
"<div>" + Localization.EmailUserActiveBodyPart2 + "</div>" +
"<div><b>" + content + "</b></div></br>" +
"<div>" + Localization.EmailUserActiveBodyPart3 + "</div>" +
"<div>" + Localization.EmailUserActiveBodyPart4 + "</div>";
mm.IsBodyHtml = true;
mm.Priority = MailPriority.Normal;
client.Send(mm);
但是当我检索Localization.EmailUserActiveBodyPart1
它时,它是根据我当前的文化进行本地化的。
如何检索指定的文化资源文件?