2

I'm currently building up an MimeMessage (Java Mail) and sending it to users, but we support multiple locales. At the time of sending we dont know what language the end user can understand.

I was wondering if its possible to attach multiple text/html to the message which are in different languages.

I.e. the first text/html is English, the second text/html is German, the third is French.

Is this possible? If so do I need to add some header to define what locale/lang the html is in?

Thanks Neil

4

2 回答 2

2

尝试添加:内容语言:en 内容语言:fr 内容语言:de

到您的附件并使用主要的电子邮件客户端(Outlook、Yahoo、Gmail 等)进行测试

于 2011-04-14T08:06:09.213 回答
0

您可能会想到两种方法。一种是用英语定义一条消息,并将其他内容添加为适当命名的附件(Deutsch.html、Francais.html 等)。您最终可能会遇到在附件名称中支持非 ASCII 字符的问题。各种 MUA 可能无法正确处理它。

其他方法是将内容放在英文中并添加多语言链接,如下所示:

Klicken Sie bitte (...)

Kliknij tu, aby przeczytać tę wiadmość w języku polskim。

这些链接将指向带有适当语言版本的消息的网页。我更倾向于第二种方法,因为它更可靠(尽管如果您想支持大量语言,这可能是个问题)。

于 2011-04-14T18:43:47.220 回答