I need to change the language in which the HTML output is generated from English to a bunch of other languages such as Spanish, French, Portugese and so on in Python. What is the best way to do it?
CodePudding user response:
I had a few tips:
- Try using NLP (Natural Language Processing) to translate into different languages, after that put it onto HTML.
Here's a link for NLP but I am not sure how to do the HTML part: https://towardsdatascience.com/how-to-detect-and-translate-languages-for-nlp-project-dfd52af0c3b5
Hope this clarifies your question.
CodePudding user response:
I haven't tried this, but first google hit for "python translate api" yields:
https://pypi.org/project/translate-api/
Their getting started has an example of translating HTML to different languages. (I'd excerpt it here but stack overflow complains it's spam if I do?).
