Skip to main content

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., 'fra_Latn', 'ewe_Latn', 'mina_Latn')

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": "fra_Latn",
"targetLanguage": "ewe_Latn",
"formality": "neutral"
}'

Example Response​

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

Supported Languages​

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

CodeLanguage
fra_LatnFrench (Français)
ewe_LatnEwe
mina_LatnMina
kdh_LatnTem (Kotokoli)
lin_LatnLingala
nmz_LatnNawdm
fon_LatnFon
las_LatnLama

Use only the canonical language codes for targetLanguage and sourceLanguage in translation requests: fra_Latn, ewe_Latn, mina_Latn, kdh_Latn, lin_Latn, nmz_Latn, fon_Latn, las_Latn.

Use Cases​

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

Next Steps​