But there is a very trivial solution anyway: the bookmarklet's little sister, Smart Keywords, as they are apparently called today, or Smart Bookmarks, or Bookmark Keywords, as they were called when the feature came to Mozilla in 2002. How quickly names change over time, eh?
Anyway, the idea is simple enough: treat the browser address field a bit like a command line. Type a command name, optionally followed by a space and a parameter, press return, and the browser looks up the command URL from your bookmarks, using the command name as a keyword (rather than having you chase through your unwieldy maze of bookmarks) and replaces occurrences of
%s
in it with the parameter you might have passed. (If you don't pass a parameter, the %s is kept intact, at least in Firefox.) And like so many other really basic ideas like this, it's immensely useful.Today I made myself a handful of keyword bookmarks for Google Language tools, one for each language, translating from German, French, Italian, Portuguese, Japanese, Korean and simplified Chinese to English, naming them by their ISO-639-1 two-letter language codes, de, fr, it, pt, ja, ko, cn. (Actually, I made two for Spanish and Japanese, as I tend to forget it's es and not sp, and ja and not jp.)
When you have bookmarked them (or those you want), visit the bookmark properties view and name them in the Keyword field. I tucked all of mine into a bookmark folder I called "translate" way down in the least accessable parts of my bookmarks, so they won't get in the way of anything.
Here is where the fun begins. Whenever I end up on a page I can't read due to it being written in some unfamiliar language, but would want to get at least a vague concept of, I prepend "ja " to the addess field and hit return, or whichever language the page was written in. Totally keyboard driven goodness, never more than seven key strokes away; Ctrl-L, Home, j a Space Return.
The expressiveness of the command line, the swift accessibility of built-in keyboard shortcuts and the clean user interface of an extensionless browser. Just the way I like it. The user interface is all neatly tucked away in your head. Non-programmers can make these things all on their own too, and it's not limited to just searches, either, as you noted above.
And for us programmers, it's trivial to marry them with common bookmarklet making, if you make the occasional bookmarklet that requires user input, typically otherwise done by way of
prompt()
. %s
works just as described above, in a javascript bookmarklet URL, too. Keep innovating, making the most of the tools at your disposal!
Very clever Firefox trick, I love it, thanks very much.
ReplyDeleteI own a French holiday Gite and end up quite often having to labouriously copy and paste Tourist information links to Google translate - you've definitely saved me some time.
Love it so much I'm passing the tip on in my own Blog
There's actually an easier way of doing that. Simply use this as the bookmark:
ReplyDeleteTranslate, and Google will automatically figure out the language. Saves the time of making 8 bookmarks, and having to figure out what language each page is.
Or to make it REALLY simple, add a bookmarklet with the address javascript:location.href="http://translate.google.com/translate?u=" + location.href + "&hl=en&safe=off&ie=UTF-8&oe=UTF-8";
ReplyDelete...
I don't see how involving javascript to achieve this effect makes anything any simpler. Also -- and while it's not any particular issue in this case, in the generic case I would advise against using bookmarklets for things like this that don't need javascript, as the above bookmarklet will leak an HTTP referer header, telling the page you end up at where you came from, which (in some cases and to some people) may intrude on their privacy.
ReplyDeleteAnother interesting we (ptaff.ca) have produced is called Liendex.
ReplyDeleteLiendex builds a collection of hyperlink to many language tools (both in french and english) using only query. In some cases, like the grand dictionnaire terminologique, we use bookmarklets because they do not want to use a REST url.
Enjoy!