Under Development
stars

Handle Multilingual Messages#

MIME Multipart/Multilingual#

NeoMutt includes support for reading and writing multipart/multilingual emails. A multipart/multilingual email is like a multipart/alternative email, except that it comes with parts of different versions of languages instead of appearances. Its format is described by RFC8255.

Reading Multipart/Multilingual Emails#

NeoMutt uses the $preferred_languages variable to determine which languages to display when displaying a multipart/multilingual email. You can have several preferred languages, separated by ,:

set preferred_languages="fr,en,de"

NeoMutt will try to match these strings against the multilingual header in the received emails “by prefix”, e.g., en will match both en and en_US.

If $preferred_languages is not set, it defaults to None, and the first part of the received multipart/multilingual email will be displayed.

Composing Multipart/Multilingual Emails#

The procedure for composing a multipart/multilingual email is similar to those in composing multipart/alternative. You have to prepare every part manually or using some scripts, and then tag and group them together into a multipart/multilingual bundle before sending it:

  1. Prepare parts of the multilingual emails.

  2. Attach them as attachments.

  3. Tag them with <tag-entry>.

  4. Edit the Content-Language header of every attachment with command <edit-language> (default to Ctrl-L). This is important, otherwise the recipient of this email will not know the corresponding languages. You can set arbitrary string as Content-Language, but it is recommended to set it as some common prefixes such as “en”, “zh” and “fr”.

  5. Group all the tagged messages together by <group-multilingual> (default to ^).

  6. Send the email as usual.

As in composing multipart/alternative, you can also use NeoMutt’s macro and some external scripts to combine this procedure into one.

After grouping, the separate parts will be displayed in a tree structure. Attachments can still be edited separately and reordered within the group, but must be ungrouped using the <ungroup-attachment> (#) binding for more advanced editing before tagging and grouping together again as described above.

📷 Screenshot Needed

Subject: Compose menu with multilingual attachment group

Description: NeoMutt compose menu showing a multipart/multilingual group after <group-multilingual> has been applied — the grouped language parts (e.g. English, French, German) are displayed in a tree structure under a single multipart/multilingual container, each with its Content-Language visible.

Highlights: The tree-structured grouping of language alternatives in the compose attachment list, showing how the separate language parts become children of the multilingual container.