armoucar/AlfredGoogleTranslateWorkflow
A workflow for Alfred that implements translation from any language to any other language that is supported by google
Google Translate Alfred Workflow
Version 2.3.1
License
The MIT License (MIT)
Copyright (c) 2013-2015 Thomas Hempel thomas@scriptme.de
Thanks to everyone who uses this workflow, gives feedback and provides fixes. You are awesome!!!
If you like the Workflow and use it a lot, please consider a small donation via PayPal. If you don't like PayPal but still want to give me a little something, feel free to contact me via the e-mail address above. :-)
Attention!
Google changed something in the API. They seem to have blocked some clients. The workflow works for now. But I can't guaranty, that it will work for long. I will try to implement a dict.cc endpoint for a future version.
This version 2 is a complete rewrite! It works differently than before while keeping the basic functionality, it is not longer bound to english and german. It know let Google decide which language is the source and you can define what the target language is in your query.
A workflow for Alfred 2 that implements translation from any language to any other language known to Google.
It's based on PHP and not very complex to understand.
How to install
Just download and double click the workflow file
Say "yes" to import it into Alfred. Done!
How to use
Open Alfred and type "translate" (or "gt") followed by the shortcode for the target language like "en" (english), "de" (german) or "it" (italian). You can find a complete list in the next section.
Alfred will show all the results that Google returned. Select the one that fits your situation best and the translated phrase will be copied to the clipboard.
Normally the workflow will let Google decide which language you typed in. This doesn't fit in every case. For example if the word is ambiguous, spelled wrong or just means something different in another language.
Since version 2.1 you can define from and to which language you want to translate. You do this via the ">" or "<" operator and the respective language codes. Here a few examples:
translate de>en Haus // Will translate "Haus" from german to english.
translate de>fr Auto // Will translate "Auto" from german to french
gt fr<en bottle // Will translate "bottle" from english to french
As you can see, it's not pre-defined which language comes first. The source language or the target language. You define it by yourself with the operator ">" or "<" depending on what you prefer.
You can also leave the operator out at all. The behavior will be as in previous versions. You can only define the target language and we will let Google decide in which language you typed your search word in.
When Google delivered the result, you can just copy the one you want to the clipboard by selecting it and pressing enter.
Alternatively, since Version 2.2, you can open the original request directly on the Google website by pressing Alt+Enter.
Languages
- auto = Automatic
- af = Afrikaans
- sq = Albanian
- ar = Arabic
- hy = Armenian
- az = Azerbaijani
- eu = Basque
- be = Belarusian
- bn = Bengali
- bg = Bulgarian
- ca = Catalan
- zh-CN = Chinese (Simplified)
- zh-TW = Chinese (Traditional)
- hr = Croatian
- cs = Czech
- da = Danish
- nl = Dutch
- en = English
- eo = Esperanto
- et = Estonian
- tl = Filipino
- fi = Finnish
- fr = French
- gl = Galician
- ka = Georgian
- de = German
- el = Greek
- gu = Gujarati
- ht = Haitian Creole
- iw = Hebrew
- hi = Hindi
- hu = Hungarian
- is = Icelandic
- id = Indonesian
- ga = Irish
- it = Italian
- ja = Japanese
- kn = Kannada
- km = Khmer
- ko = Korean
- lo = Lao
- la = Latin
- lv = Latvian
- lt = Lithuanian
- mk = Macedonian
- ms = Malay
- mt = Maltese
- no = Norwegian
- fa = Persian
- pl = Polish
- pt = Portuguese
- ro = Romanian
- ru = Russian
- sr = Serbian
- sk = Slovak
- sl = Slovenian
- es = Spanish
- sw = Swahili
- sv = Swedish
- ta = Tamil
- te = Telugu
- th = Thai
- tr = Turkish
- uk = Ukrainian
- ur = Urdu
- vi = Vietnamese
- cy = Welsh
- yi = Yiddish
Screenshots
This is how it should look like:
The end
Thanks for using the workflow!
Feel free to fork and/or make suggestions.
If you like the Workflow and use it a lot, please consider a small donation via PayPal.
Best wishes,
Thomas



