Auto-translation

Auto-translate single text

Changed on

Auto-translate single text for a project

post/api/v1/auto-translate

Request

Headers

X-SimpleLocalize-Tokenstring required

Request body

targetLanguagestring required

Provider target language key

targetProjectLanguagestring

Project target language key (optional). It's required to load additional information about the target language (e.g. DeepL glossary).

deeplFormality'default, more, less'

DeepL formality

descriptionstring

Description that will be used as a context for translation. It's useful for better translation quality.

translationProvider'GOOGLE_TRANSLATE' | 'DEEPL' | 'OPEN_AI' | 'OPEN_ROUTER' | 'CUSTOM_AI' | 'ANTHROPIC' | 'GEMINI' required

Provider for auto-translation

sourceTextstring required

Source text to translate

sourceProjectLanguagestring

Project source language key (optional). It's required to load additional information about the source language (e.g. DeepL glossary).

sourceLanguagestring

Provider source language key (optional). If not provided, the source language will be detected automatically.

Example request

{
  "targetLanguage": "en_US",
  "targetProjectLanguage": "pl_PL",
  "deeplFormality": "default",
  "description": "This is a button label in Sign Up form.",
  "translationProvider": "GOOGLE_TRANSLATE",
  "sourceText": "Hello world!",
  "sourceProjectLanguage": "pl_PL",
  "sourceLanguage": "PL"
}

Response

OK

msgstring
statusinteger

Changes

    • info

      added the new ANTHROPIC enum value to the request property

    • info

      added the new CUSTOM_AI enum value to the request property

    • info

      added the new GEMINI enum value to the request property

    • info

      added the new OPEN_ROUTER enum value to the request property

    • breaking

      removed the enum value EXTERNAL_API of the request property

    • breaking

      removed the enum value SYSTRAN of the request property

    • breaking

      the request property's minLength was increased from 0 to 1

    • breaking

      the request property's minLength was increased from 0 to 1

    • info

      api operation id autoTranslate_2 removed and replaced with autoTranslateText

    • info

      the endpoint scheme security Project API Key was added to the API

    • info

      the endpoint scheme security apiKey was removed from the API

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status