Use this API to translate text between different languages. Currently, it supports English (en) and Hindi (hi). More languages will be added soon!
URL: https://yourdomain.com/home/TranslateText
POST
Parameter | Type | Description |
---|---|---|
inputText |
string | The text you want to translate (e.g., "hello"). |
targetLang |
string | The target language code. Use hi for Hindi or en for English. |
POST /home/TranslateText Content-Type: application/x-www-form-urlencoded inputText=hello&targetLang=hi
HTTP/1.1 200 OK Content-Type: application/json { "translatedText": "नमस्ते" }
If something goes wrong, you may receive one of the following responses:
400 Bad Request
- Missing or invalid input parameters.500 Internal Server Error
- An issue with the translation service.More languages will be supported in the future. Keep checking back for updates!