This project is based on learning gained from Micrsoft Learn platform. I have built a webapp using Flask, Python and Azure Cognitive Services to translate text in multiple languages.
We Learnt:
- How to set up a Flask development environment
- How to use Flask to build a form and
- How to use the Translator service to translate text
Tools Used: Python(3.6 or above) and Visual Studio Code.
For translator service, we have used Azure Cloud Computing platform for accessing the keys for Cognitive Services.
Creating the app:
- I have created the core application in file named app.py
- The routes have been added for GET and POST methods for the user to fetch the HTML page (GET) and to provide the text, choose the translator language code and recieve the translated text along with the language code the user chose earlier (POST)
- The HTML code is present in 'templates' folder where we have two files index.html to take the input (to accept the text and language code as response for translation service) and result.html to show the output (original text, translated text and language code selected by the user)