Translation API Documentation

Use this API to translate text between different languages. Currently, it supports English (en) and Hindi (hi). More languages will be added soon!

Endpoint

URL: https://yourdomain.com/home/TranslateText

Method

POST

Request Parameters

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.

Sample Request

POST /home/TranslateText
Content-Type: application/x-www-form-urlencoded

inputText=hello&targetLang=hi
    

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json

{
    "translatedText": "नमस्ते"
}
    

Error Responses

If something goes wrong, you may receive one of the following responses:

Notes

More languages will be supported in the future. Keep checking back for updates!

Web hosting by Somee.com