---
title: "Write each notification in the recipient's · Agent Wranglers"
url: https://agentwranglers.se/playbook/notifications/channels-and-preferences/recipient-language
updated: 2026-10-21
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Write each notification in the recipient's language

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Channels and preferences](https://agentwranglers.se/playbook/notifications/channels-and-preferences.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers). Updated 2026-10-21.

- ID: NTF-38
- Level: Recommended
- Chapter: [Channels and preferences](https://agentwranglers.se/playbook/notifications/channels-and-preferences)
- Rule: Render every notification in the language stored for the recipient. Never use the language of the person or the request that caused it.
- How: When a Swedish user comments on a post, its author may read German. Store a language tag per user, such as `de` or `sv-SE`, set as [Let people pick their language](https://agentwranglers.se/playbook/website/languages-and-regions/language-switcher) says. Render at send time with that tag and the app's own message catalogue. Translate whole sentences with plural rules, as [Get plurals right in every language](https://agentwranglers.se/playbook/website/languages-and-regions/plural-rules) says. Native apps can instead send string keys, such as `loc-key` for APNs or `body_loc_key` for FCM, so the phone picks its own language. Fall back to the default language when no tag is stored.
- Check: A test lets a Swedish user trigger a notification to a German user, and the rendered text is the German template. A second test fails if any notification template lacks a translation in a supported language.

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### JavaScript example

```js
export function renderFor(recipient, typeId, values) {
  const locale = recipient.locale ?? DEFAULT_LOCALE;
  const template = MESSAGES[locale]?.[typeId] ?? MESSAGES[DEFAULT_LOCALE][typeId];
  return template(values, new Intl.PluralRules(locale));
}
```

### Python example

```python
from babel.support import Translations

def render_for(recipient, type_id: str, values: dict) -> str:
    locale = recipient.locale or DEFAULT_LOCALE
    translations = Translations.load("locales", [locale])
    return translations.gettext(type_id).format(**values)
```

## Sources

- [Apple, Generating a remote notification](https://developer.apple.com/documentation/usernotifications/generating-a-remote-notification)
- [Firebase, FCM HTTP v1 message reference](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages)

## Related rules

- [Let people pick their language](https://agentwranglers.se/playbook/website/languages-and-regions/language-switcher) in Website
- [Get plurals right in every language](https://agentwranglers.se/playbook/website/languages-and-regions/plural-rules) in Website

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/notifications/channels-and-preferences/recipient-language">Agent Wranglers notifications playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Check the recipient may still see the item when you send](https://agentwranglers.se/playbook/notifications/channels-and-preferences/recheck-access-at-send)
- [Channels and preferences](https://agentwranglers.se/playbook/notifications/channels-and-preferences)
