Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I need to send automated emails to customers whose language I am not sure about.

90 % are french and would probably not be able to read mails in english. The other 10 % would probably be able to read in english and clearly not in french.

I don't know what their language is.

I investigated the multipart/alternative that looked promising, give the mailer several variants and he selects the best one. ( see: http://www.ietf.org/rfc/rfc1766.txt )

Unfortunately no mailer seems to care about that, they always show the last part...

did someone manage to make multi-lingual mail with automatic selection of the best version for the users?

Is there some kind of trick to know?

Do you have another solution?

share|improve this question
I thought multipart/alternative was about offering the same message in different formats (typically plain text vs HTML), rather than differing content. –  AakashM Mar 14 '13 at 12:23
@AakashM : the RFC reads : When using the Multipart/Alternative body part of MIME, it is possible to have the body parts giving the same information content in different languages. In this case, one should put a Content- Language header on each of the body parts, and a summary Content- Language header onto the Multipart/Alternative itself. –  siukurnin Nov 4 '13 at 15:56
add comment

2 Answers

The common solution that I am aware of for such bi-lingual emails is to write them like this:

For the English version, see below

<The text of the message in the local language>


<The text of the message in English>

This way, you don't depend on the capabilities of the mail software of the recipient.

The reason for putting the local language first is because that is what the majority of the recipients will understand best (why bother writing a local language version if everybody understands the English version well enough).

UPDATE: If you are sending emails in HTML, also consider the use of language attributes, as explained in the answer by Matt.

share|improve this answer
add comment

We send bilingual emails in the format

<h1 lang="fr">*** La version français [follows] ***</h1>
<div lang="en">English text here</div>
<h1 lang="en">***English version precedes ***</h1>
<div lang="fr">Texte française ici</div>

(Excuse French spelling, not at work to get exact text, and not a native speaker.)

Use of the lang attribute will allow a screen reader to correctly toggle between pronunciations; use of headings will allow a screen reader to jump to the relevant version of the email (both assume support in mail client).


share|improve this answer
IOW, the Content-Type for the message is text/html, and the body is one big HTML message with 2 main sections. I like. –  james.garriss Apr 11 '13 at 12:10
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.