How to translate a complete web page?

What is the best way to translate a web page using Python/Django?

  • Let's say I have a web page, and I want to translate it to another language. One way to do it would be parse the DOM, and find out which strings need to be translated (like the title), use something like the Google Translate API, and show the result. However, sending HTTP requests to Google would make the application slow. Is there a better way to do it, especially through Python itself?

  • Answer:

Kshitij Awadhiya at Quora Visit the source

Was this solution helpful to you?

Other answers

If you're looking to actually translate a string of text between two languages, say from English "Hello" to Spanish "Hola", you might want to look into the http://code.google.com/apis/ajaxlanguage/documentation/. Another alternative due to recent deprecation of the free version of Google's API is the http://www.microsofttranslator.com/dev/. If you do not wish to rely on an external infrastructure for all your requests, the Python http://www.nltk.org/ will almost certainly be useful to you: I don't believe it will do translation directly, but it's great for machine understanding of natural language text. Edit: This might be useful in your case: http://www.catonmat.net/blog/python-library-for-google-translate/ Source: http://stackoverflow.com/questions/1316386/translating-human-languages-in-python

Deepanshu Mehndiratta

I would also recommend you look at http://www.beglobal.com/, where you have access to Machine translation APIs for tight integration They have some of the most competitive prices for Machine translation ( 10$ for 100.000 words) as well as human translation APIs (from 0.07$/word)

Georgescu Raluca

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.