I just read that Google's IM client can now do automatic translation using the Google translation services. This sounds great. I don't do a lot of IMing, but I'd love to see this in the browser. If I could just surf the web and have all web pages that weren't in my preferred language be auto-translated into my preferred language on the fly that would be really cool. Maybe we should do that in Firefox. I'm sure there'd be a performance bottleneck, but there are probably service side and client tricks that could mitigate some of that. Even if it was a bit slower to deliver translated pages, that beats not being able to read them at all or the interruption of carrying the URL to the translation service manually.
What do you all think? Are we ready for sharing all of the worlds information, regardless of language? Would it be worth it in terms of performance and degraded content fidelity?
It would mess with AJAX apps in very interesting ways.
You could probably prototype it at least as a Firefox extension. Just crawl the page DOM when DOMContentLoaded fires and translate the text nodes you find there.
It would be pretty easy to check the HTML lang attribute for anything other than the user selected one. If it doesn't match, call the Google translator to translate it.
I think the current state of automatic translators is still not mature enough to make this worth the effort. They usually fail terribly when it comes to grammar. Translating words is relatively easy, but understanding what they mean in context and reproduce them in a different language is a very different ball game.
Almost as easily done as said. I uploaded a prototype extension at http://www.graysonmixon.com/test.xpi It checks the HTML lang attribute on page load. If it is not en (english), it calls Google to translate it.
One more thing. This is a very quickly put together proof of concept thing. If you use IE View Lite, it will overwrite it. I didn't have time to get a new GUID or change all of the install.rdf and chrome.manifest stuff. I just modified the code for the extension I already wrote. It will only work for English, as again, it was quickly put together. If anyone still wants me to work on it further, I can.
Grayson, that's awesome! Thanks. It does an initial load before doing the translated load. WOuld it be possible to go straight to the translated load? Also killing the google frame and having some other visual indicator that it's being translated would be cool (other than the URL).
- A
Also, it'd be cool if it could recognize pages that couldn't be translated (google's "failed to translate" page) and return to normal page.
I just updated the file to not overwrite IE View Lite and establish it's own addons entry.
About going straight to the translated page, I don't know. If it works, it would a lot more research on xulplanet and more code.
Getting rid of the frame is easy. That's been done in the new version.
Detecting things from Google is going to be harder and probably involve parsing their webpage for a certain flag.
I would second concerns raised by Jorge. The current automated translation tools are really poor quality. For another site I worked on (not my blog) which is quite popular, I received many negative comments for offering links to automated translations because the translation quality was so poor and it reflected badly on that site, even though it wasn't the site's fault. If translations in Firefox like this go badly, it will reflect badly on Firefox and the target web site, which would not likely go down too well with the web site owners, I imagine...
Have you ever seen an autotranslated movie, read an autotranslated book, or played an autotranslated game? I have. It is an experience that is worth a laugh or two, but, seriously, we are not there yet. Autotranslation corrupts the meaning of the text in horrible ways, and often translated phrases can only be understood by mentally reversing the translation, back-guessing the original words.
A browser with autotranslation enabled by default might be an appropriate release for the next April 1st, but for all the other days of the year, my reaction would be Gollum’s “Spoiling nice fish! Give it to us raw, and wriggling!”
It is true that auto-translation is not "there" yet. That doesn't mean it won't get there - and perhaps even get there faster if usage increases.
For those of us that do use Google's translate to at least get an idea about content we can't read natively, I think this makes great sense as an extension. It is time to streamline the process. An added bonus would be if the extension also allowed you to feedback to Google on translated pages - this would mesh perfectly with the early adapters likely to use this extension, I think.
Actually, I have found that, while translating from one language (e. g. English) into another one that employs relatively complicated grammatical structures (e. g. French, German, Russian (and probably many others I don't know so well)) works relatively badly, but reading a text translated from a relatively from a complicated language such as Russian, for instance into English, is quite possible.
By the way, commentators: you should also consider that the translators Google bought for online usage are not really the latest and greatest. Of course, translators aren't perfect today, because teaching a software all the exceptions in a language could take ages. Basically, you'd need self-learning software that could learn collocations and grammatical structures by simply analysing texts and their professionally translated equivalents.
The browser extension idea is good, but automatic translation for any web page, let alone js-heavy pages (like Robert O'Callaghan mentioned) is simply annoying -- a js bookmarklet could do the same a lot more conveniently, I think.
I would be concerned mostly because automatic translation really isn't quite there yet. As others have mentioned, sometimes it works decently, and sometimes it fails with results that range anywhere from humorous to unreadable.
That, and you can't assume that everyone wants all their pages in one language--I know three and would be happy with a Web page in any of them, but I suppose there would be ways to configure this. (Related anecdote: I have the es-ES version of Firefox, and sometimes, as in the Microsoft Knowledgebase, I get fed server-side EN-to-ES machine-translated versions of Web pages ... no, thanks.)
Also, as ROC mentioned, this would pose interesting issues for JS-heavy pages such as Web apps.
As an extension, this would be godlike on many levels :) I wouldn't have it built into the 'fox though.
I would like to browse WetterZentrale as it houses the best repository of Bracknell (Now Exiter) MetO data. But of course I can't speak German. Having the translator fitted so I can find the links I need would be a godsend.
Also I have recently found a link with the High Pressure systems over North America and their relation to Magnitude 6 earthquakes in the Aleutians. I would like to pursue that before someone else gets priority for the discovery.
Having Russian and Japanese in the browser would help I am sure. Maybe I could even find some Russian and Japanese forums to annoy.
I have no URL but you can find me at alt.talk.weather and sci.geo.earthquakes newsgroups.
The Firefox browser as it stands now is 1/3 of the way there.
Quoting from above:
Have you ever seen an autotranslated movie, read an autotranslated book, or played an autotranslated game? I have. It is an experience that is worth a laugh or two, but, seriously, we are not there yet.
Autotranslation corrupts the meaning of the text in horrible ways, and often translated phrases can only be understood by mentally reversing the translation, back-guessing the original words.
Unquote.
The worst thing with relying on translators is that they require the word be spelled correctly. Firefox enables the user to spell correctly.
The next thing is grammar.
Again, this is down to the author.
Sentence structure needs to be terse and to the point. Now flowery verse. And slang and colloquialisms need to be avoided. Maybe even stripping the text of punctuation so that a comparison can be made in both languages by the user.
There is nothing to be done in a browser for that. Instead it will have to rely on one-on-one context, experience and help.
So that's 2 parts of 3.
And the rest is almost already there. Extensions required please. Don't make me wait for April. I want to be ready before the hurricane season.
I've got the download from the above link. Thanks to all.