@Aashna Joshi I think this behavior is seen since you are not passing the from language in your request to translate. In this case, the API is detecting the language to be hi-latn and providing the response in hindi as हे, माई नेम इस विकास
I see the same behavior when I use the REST API without the from language param.
If I use the from param the response is as expected.
I think you need to make a change in your application to use the from param in the call to translate text. Since you already have a method to detect language, you can use that to pass that response to the translate API with the correct language code to avoid this discrepancy.
I hope this helps!!
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.