Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm always reading English, but I'm a Spanish native speaker (I'm working on my thesis). Sometimes I need to translate a word into Spanish, and what I do now is to open a new tab and go to Google Translate and then put the word into the input field. Just a quick translation, one word or a small phrase.

I'm a Mac and Firefox user. Is there a better way to achieve this? I was thinking that maybe a dashboard widget would do the trick and I was looking for one. The other option is to install the Google Toolbar, but I really hate toolbars. I don't know, a good Firefox extension maybe?

share|improve this question

6 Answers 6

up vote 4 down vote accepted

You could look for additional dictionaries for use in Dictionary.app (included with OS X). Just like my Wikipedia dictionary (don't know if it came with the vanilla OS X installation) loads data from the web, so could your translation service. It seems to be not possible to enhance the Cmd-Ctrl-D "quick dictionary" with such a custom dictionary, though.

You can enable debugging/developer mode for Dashboard which allows you to drag widgets out of the "Dashboard view" onto the normal desktop, so you always have the widget visible.

You can look into creating a custom Text service for the Services menu (select a word in the browser and look under Application -> Services -> Text. In System Preferences -> Keyboard -> Keyboard Shortcuts -> Services you can even set keyboard shortcuts for such commands.

The custom service can be easily created using Automator.app, I just tried:

  • Create a new Automator document based on the "Service" workflow
  • Add a single action: Run Shell Script with the input passed as arguments, and the command open http://dict.cc/?s=$1 (or whatever website you use for translating)
  • Save as Translate to German (in my case it's German)
  • (Optionally) Assign a keyboard shortcut in System Preferences
  • Use it
share|improve this answer
    
I want to use translate.google.com/#en|es|$1 with Automator.app but I don't know how to encode the # character. You also need to set Pass input: as arguments to Automator. So I did: open "translate.google.com/#en|es|$1"; but it didn't work. I also tried escaping the pipes | and the #, and used %23 instead, but didn't work either. –  licorna Aug 18 '10 at 0:02
    
I didn't use any of the solutions you presented to me, but thanks, your ideas made me wanted to do it right. What I did was to create a widget in dashcode that does exactly what I wanted: send a request to google and display the result. It behaves like translate.google.com but inside the dashboard. –  licorna Aug 18 '10 at 5:04

There is a translate dashboard widget that comes with Mac OS X, since version 10.4 I believe. It includes spanish translations.

share|improve this answer
    
I tried the dashboard widget but translation quality is not really good –  licorna Aug 18 '10 at 18:11

Babelfish has a Firefox add-on.

share|improve this answer

One word: Bookmarklets

Why? Firefox addons eat your RAM.

Description: Create a new bookmark in your bookmarks-toolbar in Firefox with the code in this post or visit the following link and drag 'n drop the "Spanish" into your bookmarks-toolbar. When you want to translate something, highlight it with the mouse as if you wantet to copy it but just click in the bookmarklet. A new Tab is opened with the tranlated word.

Google Translate bookmarklet for Spanisch from http://translate.google.com/translate_buttons:

javascript:var%20t=((window.getSelection&&window.getSelection())||(document.getSelection&&document.getSelection())||(document.selection&&document.selection.createRange&&document.selection.createRange().text));var%20e=(document.charset||document.characterSet);if(t!=''){location.href='http://translate.google.com/?text='+t+'&hl=en&langpair=auto|es&tbb=1&ie='+e;}else{location.href='http://translate.google.com/translate?u='+encodeURIComponent(location.href)+'&hl=en&langpair=auto|es&tbb=1&ie='+e;};
share|improve this answer

You can always open Safari once, then select File ⇨ Open in Dashboard… to select http://translate.google.com, and then “cut” out the page snippet that does the translation. You’ll have an instant widget without any coding whatsoever.

share|improve this answer

I've assigned a shortcut to this script:

try
    set old to the clipboard as record
end try
try
    tell application "System Events" to keystroke "c" using command down
    do shell script "open \"http://translate.google.com/#auto/auto/$(LC_CTYPE=UTF-8 pbpaste | ruby -KUe 'require \"cgi\"; print CGI.escape(STDIN.read.strip)')\""
end try
try
    set the clipboard to old
end try

I also have search shortcuts for pairs of languages like http://translate.google.com/#en/ja/.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.