How to Send Multilingual Transactional Email with One API

The Problem with Multilingual Email

Building a global product means sending emails in your users' languages. Most email APIs (SendGrid, Resend, Postmark) handle delivery but leave translation entirely to you. You end up maintaining dozens of template files, manually translating strings, and hoping nothing breaks when you add a new locale.

LANGR solves this by combining transactional email delivery with an AI translation service in the same API.

The Two-Step Pattern

import { LangrClient } from "@langr/sdk";

const langr = new LangrClient({ apiKey: "lk_live_..." });

// Step 1: Translate your email content const translated = await langr.i18n.translate({ text: { subject: "Your order has been confirmed", greeting: "Hi {{name}},", body: "Your order #{{orderId}} has been confirmed and will ship within 2 business days.", cta: "Track your order", }, source_locale: "en", target_locales: ["da", "de", "fr", "ar", "ja"], context: "transactional email for e-commerce order confirmation", formal: true, });

// Step 2: Send the email in the user's locale const userLocale = "de"; // detected from user preferences const t = translated.translations[userLocale];

await langr.mail.send({ from: "[email protected]", to: "[email protected]", subject: t.subject.replace("{{name}}", "Max"), html: <p>${t.greeting.replace("{{name}}", "Max")}</p> <p>${t.body.replace("{{orderId}}", "12345")}</p> <p><a href="https://example.com/track/12345">${t.cta}</a></p>, });

What Makes This Different

RTL Support: LANGR's i18n API flags RTL locales (Arabic, Hebrew, Urdu, Persian, and 5 more). You can use this to set dir="rtl" in your email HTML.

JSON Object Translation: Instead of translating strings one by one, pass an entire JSON object. All keys are translated atomically, preserving structure.

Context-Aware: The context parameter tells the AI translator what the text is for, resulting in more accurate translations. "Track your order" translates differently in a shipping email vs. a restaurant app.

Formal Register: The formal flag switches between formal and informal address forms — critical for languages like German, French, and Japanese.

120+ Locales

LANGR supports 120+ locales out of the box, including:

  • All major European languages (da, de, fr, es, it, pt, nl, sv, no, fi, pl, cs, ro, etc.)
  • Asian languages (zh, ja, ko, hi, th, vi, id, ms, etc.)
  • RTL languages (ar, fa, he, ur, ps, ku, sd, prs, ug)
  • African languages (sw, am, ha, yo, ig, etc.)
  • Call GET /v1/i18n/locales to see the full list with native names and fallback chains.

    Pricing

    Both mail and i18n are included in all plans:

  • Free: 100 requests/day
  • Pro: 10,000 requests/day ($49/month)
  • Enterprise: Unlimited

A translate + send flow counts as 2 requests total.

Get Started

1. Get a free API key 2. npm install @langr/sdk 3. Mail API docs | i18n API docs

Try LANGR API for free

Get your API key in seconds. 100 requests/day, all services included.

Get Free API Key