Vertex AI Translation on Google Distributed Cloud (GDC) air-gapped appliance lets you translate text
written in more than ten languages into English. The service is one of three
pre-trained APIs available on your portable device for isolated machine learning
workloads.

## Translation methods

Vertex AI Translation offers the following methods available in
GDC air-gapped appliance:

| Method | Description |
|---|---|
| [`detectLanguage`](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/application/ao-user/quickstart-translation#detect-lang) | Get the name of the language you are translating. |
| [`getSupportedLanguages`](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/application/ao-user/quickstart-translation#get-supported-lang) | Return a list of languages supported by the Vertex AI Translation API. For the complete list of the supported languages, see [Supported languages for Vertex AI Translation](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/application/ao-user/vai-translation-langs). |
| [`translateText`](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/application/ao-user/quickstart-translation#translate-text) | Translate input text from one language to another. |

Before making translation requests, [set up a translation project](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/application/ao-user/vai-set-up-translation).
You can test the Vertex AI Translation API on GDC air-gapped appliance by
[translating text](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/application/ao-user/quickstart-translation)
from one language to another.

## Considerations

When using the Vertex AI Translation API, particularly the `translateText`
method, consider the following aspects:

- The maximum input length of contents for translation is 1024 characters.
- You can translate up to 61,000 characters per minute, equivalent to 1,024 characters per second.
- The `translateText` method doesn't support batching.
- Types of characters and large portions of text affect translation quality.
  Therefore, if you experience translation issues, follow these steps:

  1. Remove all special and escape characters that might affect the processing of the request.
  2. Reduce the input size by splitting the contents into smaller sentences.
  3. Translate each of the smaller sentences again by sending them in separate requests to the endpoint.

Failure to follow these limiting considerations might result in errors.