Aller au contenu principal

Translation Service

Translate content across multiple languages with YODI's translation API.

Endpoint​

POST https://admin.yodi.tg/api/ai/translate

Description​

Translate text to any supported language with high accuracy and speed.

Parameters​

Required​

ParameterTypeDescription
textstringText to translate
targetLanguagestringTarget language code (e.g., 'fr', 'ewe', 'mina')

Optional​

ParameterTypeDefaultDescription
sourceLanguagestringauto-detectSource language code
formalitystringneutralFormality level: 'formal', 'neutral', 'informal'

Example Request​

curl -X POST "https://admin.yodi.tg/api/ai/translate" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "Bonjour, comment allez-vous?",
"sourceLanguage": "fr",
"targetLanguage": "ewe",
"formality": "neutral"
}'

Example Response​

{
"message": "SUCCESS",
"error": false,
"data": {
"translatedText": "Akɔtaba me, ɔlɔ ɖe?",
"sourceLanguage": "fr",
"targetLanguage": "ewe"
},
"status": 200
}

Supported Languages​

YODI supports translation for African languages with special focus on West African languages.

CodeLanguage
minaMina
frFrench (Français)
eweEwe
temTem (Kotokoli)

Use these language codes for targetLanguage and sourceLanguage in translation requests.

Use Cases​

  • Localize mobile apps
  • Translate web content
  • Auto-translate customer emails
  • Subtitle generation
  • Document translation

Next Steps​