> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://support.trackingmore.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to Use Translation Features? (for API Users)


## 1. Request Parameters

You can specify the target language and enable translation features when using the " [Create a Tracking](https://www.trackingmore.com/docs/trackingmore/1a12771efd2e4-create-a-tracking-realtime-query) " API endpoint.
| **Parameter** | **Description** |
| ---- |
| `language` | ISO 639-1 code for the target language. If left empty, the courier's default language is used. |
| `translate_detail` | `1`: Enable translation of `origin_info.trackinfo.tracking_detail` and `destination_info.trackinfo.tracking_detail` ; `0`: Disable. |
| `translate_location` | `1`: Enable translation of `origin_info.trackinfo.location` and `destination_info.trackinfo.location` ; `0`: Disable. |
| `translate_state` | `1`: Enable translation of `origin_info.trackinfo.state` and `destination_info.trackinfo.state` ; `0`: Disable. |
| `translate_city` | `1`: Enable translation of `origin_info.trackinfo.city` and `destination_info.trackinfo.city` ; `0`: Disable. |

### Credit Deduction Rules
1. Enabling translation of `tracking_detail` deducts **one credit for each unique combination of tracking number and courier code**. For more details, please refer to [TrackingMore Billing Explained: Credits and SMS Fees](https://support.trackingmore.com/en/article/trackingmore-billing-explained-credits-and-sms-fees-hychoa/).
2. It's worth noticing that the translation of `location`, `state`, and `city` is **free of charge**.
3. If translation is enabled, but **the specified language is not supported** by TrackingMore, the tracking information will be returned in the courier's default language. In this case, **no additional credit will be deducted**.

### How it Works
**
1. If translation is enabled and the *specified language* is supported by TrackingMore, the tracking information will be translated from the courier's **default language** into the *specified language*.
2. Even when the default language and specified language are the same, TrackingMore will still attempt to translate any foreign text that may appear in the tracking information.

**Example:**
YunExpress's default language is English. However, some tracking updates may contain Chinese text:

![](https://storage.crisp.chat/users/helpdesk/website/e0174a0b5e49b000/2_1q5xvn2.png)
If the *specified language* is set to English and translation is enabled, TrackingMore will return:
| Timestamp | Transit History |
| ---- |
| Wednesday  June 12, 2024  10:06:59 Local time | Sent to export customs |
| Tuesday  June 11, 2024  09:53:27 Local time | Shipment is in transit to next facility  Mainland China, CN |

### Supported Languages

TrackingMore currently supports translations into the following languages:
| **Language Name** | **Native Name** | **ISO 639-1 Code** |
| ---- |
| English | English | en |
| Portuguese | Português | pt |
| Romanian | Limba Română | ro |
| German | Deutsch | de |
| Simplified Chinese | 简体中文 | cn/zh-Hans |
| Traditional Chinese | 繁體中文 | tw/zh-Hant |
| French | Français | fr |
| Japanese | 日本語 | ja |
| Spanish | Español | es |
| Polish | Polski | pl |
| Italian | Italiano | it |
| Dutch | Nederlands | nl |
| Swedish | Svenska | sv |

## 3.When Translation Is Disabled
 
1. If **translation is disabled** and the *specified language* **is supported** by the courier, the tracking information will be returned in that language.
2. If the *specified language* **is not supported** by the courier, TrackingMore will return the tracking information in the courier's default language.

## 4.Translation Workflow and Scenarios

The following flowchart and table outline how TrackingMore handles translation services based on your configurations when importing a shipment via the API.

### Translation Workflow

The following flowchart outlines how TrackingMore's translation service works when you import a shipment via the API:

![](https://storage.crisp.chat/users/helpdesk/website/e0174a0b5e49b000/76f07f20ea5f44f3fc6dc702a82a85_4cb2dn.png)
### Specific Scenarios

The table below can help you understanding all specific scenarios. (√ = YES, x = NO, / = No Matter)
| Specified a language | Enabled translation | Supported by courier | Supported by TrackingMore | *Response* |
| ---- |
| √ | × | √ | / | Tracking information in the courier's default language |
| √ | × | / | / | Tracking information in the courier's default language |
| √ | √ | √ | √ | Tracking information in the specified language, which is translated from the courier's default language |
| √ | √ | × | √ | Tracking information in the specified language that is provided by the courier |
| √ | × | × | × | Tracking information in courier's default language |
| √ | × | / | √ | Tracking information in the courier's default language, with texts in other languages translated |
| × | √ | / | / | Tracking information in the courier's default language |
| × | × | √ | / | Tracking information in the courier's default language |

## 5.Change the Specified Language

You can use the " [Update a tracking by ID](https://www.trackingmore.com/docs/trackingmore/ed1ad3cfa2fdf-update-a-tracking-by-id) " endpoint to change the specified language. However, **enabling or disabling the translation feature** via this endpoint is **not supported**.

### Credit Deduction Rules

1. If an additional credit has already been deducted for the shipment, changing the *specified language* will **not** deduct another credit.
2. If `tracking_detail` translation was initially enabled and you update the *specified language* from an unsupported one to a supported one, an additional credit will be deducted.

## 6. Best Practices

1. Always confirm default languages and supported languages of your courier partners by using the " [Get all couriers](https://www.trackingmore.com/docs/trackingmore/7496dd3c3c0ac-get-all-couriers) " API endpoint.
2. Enable translations when mixed-language results are common.
