A JavaScript bookmark to translate webpages

Jul 07, '05 08:09:00AM

Contributed by: chris.wiggins

Want to try converting a Japanese website to English? Create a new bookmark in Safari's bookmarks bar (it doesn't matter for what site), then choose Bookmarks -> Show All Bookmarks and edit the newly-created bookmark. Give it a useful name, and for the URL, enter this string:

javascript:void(location.href='http://translate.google.com/translate?u='+location.href)
Now when you're viewing a Japanese site, just click the toolbar bookmark and you'll see Google's translation of the page.

[robg adds: This should work in any browser, and it should also work for any language that Google can translate, not just Japanese. You can see what languages are possible on Google's Language Tools page. This is a more generic version of this older hint, which did the same thing but required a hard-coded URL for each language.]

Comments (13)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20050620061435108