> For the complete documentation index, see [llms.txt](https://codemash.gitbook.io/codemash/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codemash.gitbook.io/codemash/cloud/push/templates/translate.md).

# Translate a template

Add a translation of a push template for every project language.

**Where:** Push → Templates → a template → **Translations** · `/projects/<project>/push/templates/<templateId>/edit`

## Before you start

* The language is a project language (Project → Settings → Languages). The tags in the form offer only project languages.
* The template exists — see [Create or edit a template](/codemash/cloud/push/templates/editor.md). The list shows **Missing \<language>** for every language it still lacks.

## Steps

1. Open the template, here `Password changed`.
2. Under **Translations**, press the tag of the missing language, here **LT**. A new block **Lithuanian** appears under the English one.
3. Fill its **Title** and **Body**. Use the same tokens as in the other languages.

   <figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-7f13145b925cd051c08e8e465d7fc1b21cc10837%2Ftemplates-translate-1.png?alt=media" alt="The Lithuanian block of Password changed with Title Jūsų slaptažodis pakeistas and a Body with @Model.FirstName"><figcaption><p>The Lithuanian translation.</p></figcaption></figure>
4. Press **Update**.

## Result

Cloud returns to the list, and the **Missing lt** badge of the template is gone. A campaign with **Each recipient's language** now sends Lithuanian to recipients whose language is `lt`, and English to everyone else.

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-415d66d7e6830d4db923bbd1e1e84024fe6f4588%2Ftemplates-delete-2.png?alt=media" alt="Push Templates list: Password changed without a Missing badge; the five Membership templates still show Missing lt"><figcaption><p>The template has every project language now.</p></figcaption></figure>

## Change or remove it later

* **Change a translation** — edit its fields and press **Update**.
* **Remove a translation** — press the bin under its block (or its language tag again), then **Update**. The template shows **Missing \<language>** again and cannot be sent until it is back.

## Do it from code

Send the whole `translations` list with the new language added.

```ts
const id = 'tmpl_3YjAkf4JgT2PJ5ioTVqZMp'; // Appointment reminder
const { item } = await norbix.hub.notifications.getPushTemplate({ id });
await norbix.hub.notifications.updatePushTemplate({
  viewId: id, templateName: item.templateName, description: item.description,
  communicationChannel: item.communicationChannel,
  translations: item.translations.map((t) => (t.language === 'en' ? { ...t, content: { ...t.content, title: 'See you tomorrow at Acme Clinic' } } : t)),
});
```

```sh
norbix hub notifications push message content tokens get --id tmpl_2ghEVN2y6zJ29Adb1tPOby
```

The CLI line lists the tokens of every translation — check that each language uses the same ones. The client setup is on the [Push page](/codemash/cloud/push.md#use-it-from-code). API: [Update Push Template](/codemash/api-reference/notifications/push/update-push-template.md) · [Get Push Message Content Tokens](/codemash/api-reference/notifications/push/get-push-message-content-tokens.md)
