Message basics Required
Declare the language and text direction
State the message language in a Content-Language header. In HTML mail, also set it on the root, and set dir for right-to-left languages.
How to do it
Add Content-Language (RFC 3282) with a language tag such as sv or ar. In the HTML part, set lang and dir on the html element, and repeat them on the main wrapper. Some clients strip the html element. Screen readers use the language to pick a voice. Plain-text mail needs only the header.
Example
<html lang="ar" dir="rtl">
<body>
<div lang="ar" dir="rtl">
<p>تم شحن طلبك.</p>
</div>
</body>
</html>
How to check
The raw source of a test message shows Content-Language. In HTML mail, lang is set on the root and the wrapper. An Arabic or Hebrew test message reads right to left in a webmail client.
For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers email playbook: https://agentwranglers.se/playbook/email/message-basics/language-and-direction.