Translating APIs into a different language

Welcome to our support article designed to guide you through the process of translating the APIs response into multiple languages. You can use translators like GPT, Azure, and AWS to translate your responses in simple steps.

 Last updated : 15 Jan, 2025

How to change the language

Go back to Dashboard select the translator option and select the different translator.

 

GPT Translator

Features:

  • Models Available: GPT-4, GPT-4-turbo, GPT-3.5-turbo, GPT-3.5-turbo-16k.
  • Response Time: Poor for large datasets but sufficient for smaller translations.
  • Accuracy: Very high, making it ideal for critical translations requiring precision.
  • Cost: Low compared to alternatives.

Setup:

  1. Choose the GPT model from the dropdown menu (e.g., GPT-3.5-turbo-16k for larger text processing).
  2. Add your API key from OpenAI in the provided field.
  3. Save the configuration.

Best For: Tasks requiring highly accurate translations with moderate response time requirements.

 

Microsoft Translator

Features:

  • Response Time: Very good, ideal for real-time or fast-paced environments.
  • Accuracy: Good for most translations but may lack nuance in highly technical texts.
  • Cost: Medium, depending on usage.

Setup:

  1. Select Microsoft Translator from the dropdown menu.
  2. Add your Azure API Key and specify the Azure Region.
  3. Save your settings.

Best For: High-speed translation tasks with good accuracy, suitable for websites requiring quick updates.

 

AWS Translate

Features:

  • Response Time: Above average; balances speed and quality.
  • Accuracy: Matches Microsoft Translator in most scenarios.
  • Cost: Medium, similar to Microsoft Translator.

Setup:

  1. Select AWS Translator from the dropdown menu.
  2. Add the AWS Region, Access Key, and Secret Key.
  3. Save your settings.

Best For: Projects that require balanced speed and quality, with flexibility in scaling.

 

How to change the language in postman

  • We can change the language by using the below table.
  • Example : If we enter “pt” in the request parameters language section, the response will be in the "Portuguese Language". 
Use translator for other language:

Update translator:  https://divineapi.com/translator

en  For English 

hi  For Hindi 

pt For Portuguese 

fr For French 

es For Spanish 

ru For Russian 

de For German 

nl For Dutch 

it For Italian 

pl For Polish 

ar For Arabic 

ja For Japanese 

zh For Chinese

 

2. Making the Request

Hit the 'Send' button to submit your request.

 

3. Deciphering the Response

The API's response will be structured as follows:

{
    "success": 1,
    "data": {
        "prediction": {
            "card": "O MUNDO",
            "category": "Ereto",
            "yes_no": "SIM",
            "result": "O mundo é a 21ª carta principal dos Arcanos entre todas as outras 22 cartas dos Arcanos. A figura apresentada neste cartão representa positividade, sucesso, harmonia e equilíbrio. Esta carta pode ser vista através de duas posições, vertical e reservada, e cada uma significa um significado diferente. A versão vertical ilustra o período feliz de sua vida. Seu passado e fase ruim da vida acabaram; Agora é a hora de olhar para fora e desfrutar de seus novos começos. Seu trabalho árduo e esforços vão produzir resultados que você vai desfrutar e viver a vida feliz e ao máximo.",
            "image": "https://astroapi-5.divineapi.com/public/uploads/yes_no_tarot/156_2.jpg",
            "image2": "https://astroapi-5.divineapi.com/public/uploads/yes_no_tarot/156.jpg"
        }
    }
}

4. Error Handling and Tips for Troubleshooting

  • 401 Unauthorized: Ensure the accuracy of your API key and bearer token.
  • 400 Bad Request: Double-check the completeness and accuracy of all parameters.
  • 429 Too Many Requests: Be mindful of the API's request rate limits.
  • 500 Internal Server Error: Server-side issue; attempt your request again later.
  • 404 Not Found: Verify the request URL's correctness.

5. Conclusion

We hope this guide has provided you with the necessary information to effectively use our API. Should you encounter any issues or have further questions, please refer to our comprehensive documentation or reach out to our support team. We are committed to ensuring your experience with Divine API is smooth and successful. Thank you for choosing our services!