# Multi-Language Support

![image.png](https://api.apidog.com/api/v1/projects/451700/resources/376588/image-preview)

Developers are able to utilize the feature of multi-language in certain endpoints, as shown in the table of [Applicable Locations](#applicable-locations), to assure that the content is fit to the language set in a store. 

That said, it is achievable by setting header values, such as `ACCEPT-LANGUAGE` and `CONTENT-LANGUAGE`. Let's dive into each one of the header values settings.

<!-- focus: false -->

![header ValueImage](https://cdn.salla.network/docs/MerchantAPI/multiLang-01.jpg)


## Accept Language

Accept-Language, a request HTTP header, advertises which languages the merchant is able to understand, and which locale variant is preferred.

Set Language Code you want to get the response with. Use the `iso_code` value you get from the [Language Endpoint](https://docs.salla.dev/5738815e0) as a value in this header.

By default, Accept-Language header is set to the Arabic language, with an `iso_code` of `ar`.

### Content Language (Optional)

Content-Language, an entity header, is used to describe the language(s) intended for the audience, allowing the developer to differentiate based on the merchant's preferred language.

Checkout the [Languages Endpoint](https://docs.salla.dev/5738815e0) for more on the ISO Codes.

:::info
🧵 __TL;DR__
 The best way to think of this is that `Content-Language` describes content and `Accept-Language` conveys a preference.
:::

## Usage

The following cURL request example gets Product Details in the English and Arabic languages and returns a corresponding payload. Note that the header request is appending the `ACCEPT-LANGUAGE` to the specified language.


<Tabs>
  <Tab title="English Language">

<br>

### cURL Request Sample
```bash 
curl --location --request GET 'https://api.salla.dev/admin/v2/products/720881993' \
--header 'ACCEPT-LANGUAGE: en' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
```


<br>

### Response Sample
```json
{
  "status": 200,
  "success": true,
  "data": {
    "id": 720881993,
    "promotion": {
      "title": "Order now",
      "sub_title": "veggie pizza"
    },
    "sku": "54534534",
    "mpn": null,
    "gtin": null,
    "type": "food",
    "name": "Pizza",
    "short_link_code": "zlrrRr",
    "urls": {
      "customer": "https://salla.sa/dev-wofftr4xsra5xtlv/pizza/p720881993",
      "admin": "https://s.salla.sa/products/720881993"
    },
    "price": {
      "amount": 51.75,
      "currency": "SAR"
    },
    "taxed_price": {
      "amount": 51.75,
      "currency": "SAR"
    },
    "pre_tax_price": {
      "amount": 45,
      "currency": "SAR"
    },
    "tax": {
      "amount": 6.75,
      "currency": "SAR"
    },
    "description": "<p><br></p>",
    "quantity": null,
    "status": "sale",
    "is_available": true,
    "views": 0,
    "sale_price": {
      "amount": 51.75,
      "currency": "SAR"
    },
    "sale_end": "2022-05-26",
    "require_shipping": true,
    "cost_price": "15.00",
    "weight": 0.25,
    "with_tax": true,
    "url": "https://salla.sa/dev-wofftr4xsra5xtlv/pizza/p720881993",
    "main_image": "https://cdn.salla.sa/bYQEn/buItWZf4OLbaTmL7vTMlDUWLOn20hfpq3QUbD2AB.jpg",
    "images": [
      {
        "id": 1592532977,
        "url": "https://cdn.salla.sa/bYQEn/fruYYNomFLINttfdlKPAz7WYG50z0j5zPzzy2MjS.jpg",
        "main": true,
        "three_d_image_url": "",
        "alt": "",
        "video_url": "",
        "type": "image",
        "sort": 0
      }
    ],
    "sold_quantity": "1",
    "rating": {
      "total": 0,
      "count": 1,
      "rate": 0
    },
    "regular_price": {
      "amount": 51.75,
      "currency": "SAR"
    },
    "max_items_per_user": 2,
    "maximum_quantity_per_order": 2,
    "show_in_app": true,
    "notify_quantity": null,
    "hide_quantity": false,
    "unlimited_quantity": true,
    "managed_by_branches": false,
    "calories": "600.00",
    "metadata": {
      "title": null,
      "description": null
    },
    "allow_attachments": false,
    "is_pinned": false,
    "pinned_date": "2022-05-24 15:40:23",
    "sort": 0,
    "enable_upload_image": true,
    "updated_at": "2022-05-26 09:45:09",
    "options": [
      {
        "id": 1674915438,
        "name": "الاضافات",
        "description": "",
        "type": "checkbox",
        "required": true,
        "associated_with_order_time": 0,
        "availability_range": false,
        "not_same_day_order": false,
        "choose_date_time": null,
        "from_date_time": null,
        "to_date_time": null,
        "sort": 0,
        "advance": false,
        "display_type": null,
        "visibility": "always",
        "translations": {
          "ar": {
            "option_name": "الاضافات",
            "description": ""
          }
        },
        "values": [
          {
            "id": 152115913,
            "name": "بصل",
            "price": {
              "amount": 0,
              "currency": "SAR"
            },
            "display_value": null,
            "advance": false,
            "option_id": 1674915438,
            "image_url": null,
            "hashed_display_value": null,
            "translations": {
              "ar": {
                "option_details_name": "بصل"
              }
            }
          },
          {
            "id": 1526610378,
            "name": "فلفل",
            "price": {
              "amount": 0,
              "currency": "SAR"
            },
            "display_value": null,
            "advance": false,
            "option_id": 1674915438,
            "image_url": null,
            "hashed_display_value": null,
            "translations": {
              "ar": {
                "option_details_name": "فلفل"
              }
            }
          },
          {
            "id": 886790347,
            "name": "زيتون",
            "price": {
              "amount": 0,
              "currency": "SAR"
            },
            "display_value": null,
            "advance": false,
            "option_id": 1674915438,
            "image_url": null,
            "hashed_display_value": null,
            "translations": {
              "ar": {
                "option_details_name": "زيتون"
              }
            }
          }
        ]
      }
    ],
    "skus": [],
    "categories": [
      {
        "id": 399447873,
        "name": "Italian",
        "urls": {
          "customer": "https://salla.sa/dev-wofftr4xsra5xtlv/italian/c399447873",
          "admin": "https://s.salla.sa/categories"
        },
        "items": [
          {
            "id": 1887256138,
            "name": "Pizza",
            "urls": {
              "customer": "https://salla.sa/dev-wofftr4xsra5xtlv/pizza/c1887256138",
              "admin": "https://s.salla.sa/categories"
            },
            "items": [],
            "parent_id": 399447873,
            "status": "active",
            "sort_order": 0
          }
        ],
        "parent_id": 298280307,
        "status": "active",
        "sort_order": 0
      }
    ],
    "brand": {
      "id": 146591953,
      "name": "Pizza time",
      "description": "Pizza store since 1955",
      "banner": null,
      "logo": "https://cdn.salla.sa/bYQEn/LeeG0bRRnUvjaz31JQtWSwZNRsLiJUigt9LK0riW.jpg",
      "ar_char": "ب",
      "en_char": "B"
    },
    "tags": [
      {
        "id": 1285143056,
        "name": "أكل"
      },
      {
        "id": 1924963095,
        "name": "طعام"
      }
    ]
  }
}
```

  </Tab>
  <Tab title="Arabic Language">

<br>

### cURL Request Sample     
```bash
curl --location --request GET 'https://api.salla.dev/admin/v2/products/720881993' \
--header 'ACCEPT-LANGUAGE: ar' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'

```

<br>
### Response Sample
```json

{
  "status": 200,
  "success": true,
  "data": {
    "id": 720881993,
    "promotion": {
      "title": "اطلبها ساخنه",
      "sub_title": "بيتزا خضار مشكل"
    },
    "sku": "54534534",
    "mpn": null,
    "gtin": null,
    "type": "food",
    "name": "بيتزا",
    "short_link_code": "zlrrRr",
    "urls": {
      "customer": "https://salla.sa/dev-wofftr4xsra5xtlv/بيتزا/p720881993",
      "admin": "https://s.salla.sa/products/720881993"
    },
    "price": {
      "amount": 51.75,
      "currency": "SAR"
    },
    "taxed_price": {
      "amount": 51.75,
      "currency": "SAR"
    },
    "pre_tax_price": {
      "amount": 45,
      "currency": "SAR"
    },
    "tax": {
      "amount": 6.75,
      "currency": "SAR"
    },
    "description": "<p><strong style=\"color: rgb(189, 193, 198); background-color: rgb(32, 33, 36);\">Pizza</strong><span style=\"color: rgb(189, 193, 198); background-color: rgb(32, 33, 36);\">)‏ هي أكلة تعود أصولها إلى دول شرق البحر الأبيض المتوسط كاليونان وتركيا حيث كانوا يقومون بإنضاج طبقة من العجين على حجر ساخن ويغطونها بأنواع المكونات المختلفة مثل اللحم والخضروات.</span></p>",
    "quantity": null,
    "status": "sale",
    "is_available": true,
    "views": 0,
    "sale_price": {
      "amount": 51.75,
      "currency": "SAR"
    },
    "sale_end": "2022-05-26",
    "require_shipping": true,
    "cost_price": "15.00",
    "weight": 0.25,
    "with_tax": true,
    "url": "https://salla.sa/dev-wofftr4xsra5xtlv/بيتزا/p720881993",
    "main_image": "https://cdn.salla.sa/bYQEn/buItWZf4OLbaTmL7vTMlDUWLOn20hfpq3QUbD2AB.jpg",
    "images": [
      {
        "id": 1592532977,
        "url": "https://cdn.salla.sa/bYQEn/fruYYNomFLINttfdlKPAz7WYG50z0j5zPzzy2MjS.jpg",
        "main": true,
        "three_d_image_url": "",
        "alt": "",
        "video_url": "",
        "type": "image",
        "sort": 0
      }
    ],
    "sold_quantity": "1",
    "rating": {
      "total": 0,
      "count": 1,
      "rate": 0
    },
    "regular_price": {
      "amount": 51.75,
      "currency": "SAR"
    },
    "max_items_per_user": 2,
    "maximum_quantity_per_order": 2,
    "show_in_app": true,
    "notify_quantity": null,
    "hide_quantity": false,
    "unlimited_quantity": true,
    "managed_by_branches": false,
    "calories": "600.00",
    "metadata": {
      "title": null,
      "description": null
    },
    "allow_attachments": false,
    "is_pinned": false,
    "pinned_date": "2022-05-24 15:40:23",
    "sort": 0,
    "enable_upload_image": true,
    "updated_at": "2022-05-26 09:45:09",
    "options": [
      {
        "id": 1674915438,
        "name": "الاضافات",
        "description": "",
        "type": "checkbox",
        "required": true,
        "associated_with_order_time": 0,
        "availability_range": false,
        "not_same_day_order": false,
        "choose_date_time": null,
        "from_date_time": null,
        "to_date_time": null,
        "sort": 0,
        "advance": false,
        "display_type": null,
        "visibility": "always",
        "translations": {
          "ar": {
            "option_name": "الاضافات",
            "description": ""
          }
        },
        "values": [
          {
            "id": 152115913,
            "name": "بصل",
            "price": {
              "amount": 0,
              "currency": "SAR"
            },
            "display_value": null,
            "advance": false,
            "option_id": 1674915438,
            "image_url": null,
            "hashed_display_value": null,
            "translations": {
              "ar": {
                "option_details_name": "بصل"
              }
            }
          },
          {
            "id": 1526610378,
            "name": "فلفل",
            "price": {
              "amount": 0,
              "currency": "SAR"
            },
            "display_value": null,
            "advance": false,
            "option_id": 1674915438,
            "image_url": null,
            "hashed_display_value": null,
            "translations": {
              "ar": {
                "option_details_name": "فلفل"
              }
            }
          },
          {
            "id": 886790347,
            "name": "زيتون",
            "price": {
              "amount": 0,
              "currency": "SAR"
            },
            "display_value": null,
            "advance": false,
            "option_id": 1674915438,
            "image_url": null,
            "hashed_display_value": null,
            "translations": {
              "ar": {
                "option_details_name": "زيتون"
              }
            }
          }
        ]
      }
    ],
    "skus": [],
    "categories": [
      {
        "id": 399447873,
        "name": "ايطالي",
        "urls": {
          "customer": "https://salla.sa/dev-wofftr4xsra5xtlv/ايطالي/c399447873",
          "admin": "https://s.salla.sa/categories"
        },
        "items": [
          {
            "id": 1887256138,
            "name": "بيتزا",
            "urls": {
              "customer": "https://salla.sa/dev-wofftr4xsra5xtlv/بيتزا/c1887256138",
              "admin": "https://s.salla.sa/categories"
            },
            "items": [],
            "parent_id": 399447873,
            "status": "active",
            "sort_order": 0
          }
        ],
        "parent_id": 298280307,
        "status": "active",
        "sort_order": 0
      }
    ],
    "brand": {
      "id": 146591953,
      "name": "بيتزا تايم",
      "description": "مخبز بيتزا من 1955",
      "banner": null,
      "logo": "https://cdn.salla.sa/bYQEn/LeeG0bRRnUvjaz31JQtWSwZNRsLiJUigt9LK0riW.jpg",
      "ar_char": "ب",
      "en_char": "B"
    },
    "tags": [
      {
        "id": 1285143056,
        "name": "أكل"
      },
      {
        "id": 1924963095,
        "name": "طعام"
      }
    ]
  }
}

```



  </Tab>

</Tabs>


### Applicable Variables

The following section showcases the endpoints with their respective available translation variables that developers may use to demonstrate multi-language support.

#### [Create Product Endpoint](https://docs.salla.dev/api-5394167)

| Variable Title          |
| ----------------------- |
| `metdata.title `      |
| `metdata.description `   |
| `metdata.url `   |

#### [List Products Endpoint](https://docs.salla.dev/api-5394168)

| Variable Title          |
| ----------------------- |
| `name`                  |
| `promotion.title `      |
| `promotion.subtitle `   |
| `metdata.title `      |
| `metdata.description `   |
| `metdata.url `   |
| `description` |
| `categories.name `      |

#### [Product Details Endpoint](https://docs.salla.dev/api-5394169)

| Variable Title          |
| ----------------------- |
| `name`                  |
| `promotion.title`       |
| `promotion.subtitle`    |
| `metdata.title `      |
| `metdata.description `   |
| `metdata.url `   |
| `description` |
| `categories.name`       |

#### [Update Product Endpoint](https://docs.salla.dev/api-5394170)

<Tabs>
  <Tab title="Body Request">
   
| Variable Title          |
| ----------------------- |
| `metdata_title `      |
| `metdata_description `   |
| `metdata_url `   |

  </Tab>
  <Tab title="Body Response">

| Variable Title          |
| ----------------------- |
| `name`                  |
| `promotion.title`       |
| `promotion.subtitle`    |
| `metdata.title `      |
| `metdata.description `   |
| `metdata.url `   |
| `description` |

  </Tab>
</Tabs>

#### [Product Details by SKU Endpoint](https://docs.salla.dev/api-5394173)

| Variable Title          |
| ----------------------- |
| `metdata.title `      |
| `metdata.description `   |
| `metdata.url `   |

#### [Update Product by SKU Endpoint](https://docs.salla.dev/api-5394174)

<Tabs>
  <Tab title="Body Request">

| Variable Title          |
| ----------------------- |
| `metdata_title `      |
| `metdata_description `   |
| `metdata_url `   |
  </Tab>
  <Tab title="Body Response">


| Variable Title          |
| ----------------------- |
| `metdata.title `      |
| `metdata.description `   |
| `metdata.url `   |

  </Tab>
</Tabs>


#### [Create Custom Sub-Status](https://docs.salla.dev/api-5394149)

| Variable Title          |
| ----------------------- |
| `name`      |
| `message`   |

#### [List Order Statuses](https://docs.salla.dev/api-5394146)

| Variable Title          |
| ----------------------- |
| `name`      |

#### [Order Status Details](https://docs.salla.dev/api-5394151)

| Variable Title          |
| ----------------------- |
| `name`      |
| `message`   |

#### [Update Statuses ](https://docs.salla.dev/api-5394152)

| Variable Title          |
| ----------------------- |
| `name`      |
| `message`   |

#### [List Branches Endpoint](https://docs.salla.dev/api-5394224)
| Variable Title |
| -- |
| `name` |
| `address_description` |
| `street` |
| `local` |

#### [Branch Details Endpoint](https://docs.salla.dev/api-5394225)
| Variable Title |
| -- |
| `name` |
| `address_description` |
| `street` |
| `local` |

#### [Update Branch Endpoint](https://docs.salla.dev/api-5394226)
| Variable Title |
| -- |
| `name` |
| `address_description` |
| `street` |
| `local` |

#### [List Categories Endpoint](https://docs.salla.dev/api-5394207)

| Variable Title |
| -------------- |
| `name`         |
| `items.name`   |

#### [Category Details Endpoint](https://docs.salla.dev/api-5394208)

| Variable Title |
| -------------- |
| `name`         |
| `items.name`   |

#### [Update Category Endpoint](https://docs.salla.dev/api-5394209)

| Variable Title |
| -------------- |
| `name`         |

#### [List Brands](https://docs.salla.dev/api-5394213)

| Variable Title |
| -------------- |
| `name`         |
| `description`  |
|`metadata.title`|
|`metadata.description`|
|`metadata.url`|

#### [Brand Details Endpoint](https://docs.salla.dev/api-5394214)

| Variable Title |
| -------------- |
| `name`         |
| `description`  |
|`metadata.title`|
|`metadata.description`|
|`metadata.url`|

#### [Update Brand Endpoint](https://docs.salla.dev/api-5394215)

| Variable Title |
| -------------- |
| `name`         |
| `description`  |
|`metadata.title`|
|`metadata.description`|
|`metadata.url`|

#### [List Special Offers](https://docs.salla.dev/api-5394218)

| Variable Title |
| -------------- |
| `name`         |
| `message`  |

#### [Special Offer Details](https://docs.salla.dev/api-5394219)
| Variable Title |
| -------------- |
| `name`         |
| `message`  |

#### [Update Special Offer](https://docs.salla.dev/api-5394220)

| Variable Title |
| -------------- |
| `name`         |

#### [List Advertisments Endpoint](https://docs.salla.dev/api-5394265)

| Variable Title |
| -------------- |
| `description`  |

#### [Advertisement Details Endpoint](https://docs.salla.dev/api-5394266)

| Variable Title |
| -------------- |
| `description`  |

#### [Update Advertisement Endpoint](https://docs.salla.dev/api-5394267)

| Variable Title |
| -------------- |
| `description`  |

#### [List SEO Settings Endpoint](https://docs.salla.dev/api-5394262)

| Variable Title |
| -------------- |
| `title`        |
| `keywords`     |
| `description`  |

#### [Update SEO Settings Endpoint](https://docs.salla.dev/api-5394263)

| Variable Title |
| -------------- |
| `title`        |
| `keywords`     |
| `description`  |
