> For the complete documentation index, see [llms.txt](https://docs.2checkout.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.2checkout.com/json-rpc-api-reference/json-rpc-api-6.0/api-requests/promotions/add-translations.md).

# Add translations

Use the **addPromotionTranslations** method to add localized texts to existing promotions.

## Request parameters

<table><thead><tr><th width="195.86669921875">Parameter</th><th>Type / Description</th></tr></thead><tbody><tr><td><code>sessionID</code></td><td><p><strong>Required (string)</strong></p><p>Output of the <strong>Login</strong> method.</p></td></tr><tr><td><code>promotionCode</code></td><td><p><strong>Required (string)</strong></p><p>The code corresponding to the promotion that you want to add translations to.</p></td></tr><tr><td><code>promotions</code></td><td><strong>Required (array of PromotionTranslations objects)</strong></td></tr><tr><td><code>promotions.language</code></td><td><p><strong>Required (string)</strong></p><p>ISO country code corresponding to the country you want to set the translation for.</p></td></tr><tr><td><code>promotions.name</code></td><td><p><strong>Required (string)</strong></p><p>Localized promotion name applicable to the selected country.</p></td></tr></tbody></table>

### Request sample

```php
<?php

require ('PATH_TO_AUTH');

// Promotion code corresponding to the promotion you want to add translations to
$promotionCode = '';

// Defining a translation for German shoppers
$promotionTranslation1 = new stdClass;
$promotionTranslation1->Language = 'de';
$promotionTranslation1->Name = 'YOUR_GERMAN_PROMOTION_NAME';

// Defining a translation for Bulgarian shoppers
$promotionTranslation2 = new stdClass;
$promotionTranslation2->Language = 'bg';
$promotionTranslation2->Name = 'YOUR_BULGARIAN_PROMOTION_NAME';

$translations = [$promotionTranslation1, $promotionTranslation2];

$jsonRpcRequest = array (
  'jsonrpc' => '2.0',
  'id' => $i++,
  'method' => 'addPromotionTranslations',
  'params' => array($sessionID, $promotionCode, $translations)
);
var_dump (callRPC($jsonRpcRequest, $host));
```

## Response parameters

<table><thead><tr><th width="206.5333251953125">Parameter</th><th>Type</th></tr></thead><tbody><tr><td><code>promotionTranslation</code></td><td><strong>Object</strong></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.2checkout.com/json-rpc-api-reference/json-rpc-api-6.0/api-requests/promotions/add-translations.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
