Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

« Newer Snippets
Older Snippets »
Showing 1-3 of 3 total  RSS 

Babelfish translate

Ok, so maybe some of you might think that Babelfish's the best translator out there. I don't know about that , but I do know where my towel is ;)
So, boys and girls, here's the bookmarklet that allows to translate your current web-page using the babelfish translation engine.

javascript:location.href='http://babelfish.altavista.com/babelfish/tr?trurl='+encodeURIComponent(location.href)+'&lp=%s&btnTrUrl=Translate'


To make it useful, save it as a bookmark in FF (or as a new search engine in Opera) and give it a keyword/shortcut by editing the bookmark's properties in FF (or the search properties in Opera). Let's call him, say 'bf', that should do it.

Here are some examples:
bf en_fr
bf fr_en
bf en_ja


Enjoy!
G.R.

Save to Bookmarks/Favorites

// Cross-browser code for IE/Mozilla


var bookmarkurl="Add full URI here"
var bookmarktitle="Add your title here"

function addbookmark(){
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)//IE
window.sidebar.addPanel( bookmarktitle, bookmarkurl, '' );//Moz
}

//add javascript:addbookmark(); to the HTML to call the function

Making a backup of your del.icio.us bookmarks

wget http://del.icio.us/api/posts/all --http-user=YOURUSERNAME --http-passwd=YOURPASSWORD
« Newer Snippets
Older Snippets »
Showing 1-3 of 3 total  RSS