百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
A

AlfredGoogleTranslateWorkflow

> 编程语言
开源

一个用于 Alfred 的工作流程,可实现从任何语言到 Google 支持的任何其他语言的翻译

397 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

一个用于 Alfred 的工作流程,可实现从任何语言到 Google 支持的任何其他语言的翻译

Google Translate Alfred Workflow

Version 3.1.2

Changelog

  • This integrates a library to get Google results without the problem of running into the request limit (see https://github.com/Stichoza/google-translate-php). The only downside I see at the moment, is that the used API only returns one result and no alternatives. But I guess it's better than not working at all.

License

The MIT License (MIT)

Copyright (c) 2013-2016 Thomas Hempel

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. :-)

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 at the end of this document.

Since Version 3.0.0 there is a new target language format available. It is a simple comma separated list. In other words, if you want to translate to a specific combination of languages you can achieve that like this:

gt fr,en Bildschirm

Of course you can still select the source and target like before. But keep in mind, that you can only set multiple target languages. For obvious reasons, you can't define multiple source languages.

The workflow will fall back to your default settings when a certain language is invalid. This also works in lists of languages. If you for example type something like

gt en,ger,fr Haus

This would fallback to

gt en,fr Haus

since "ger" is not a valid language identifier.

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 "en Haus // Will translate "Haus" from german to english. translate de>fr Auto // Will translate "Auto" from german to french gt fr" 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.

If you want to have the result copied and pasted into your open document automatically, use Cmd+Enter when selecting the result. This works from Version 3.0.0.

Settings

From Version 3.0.0 you can define the default values, that are used directly within the worflow. So, you no longer have to edit the source code files.

To show all available options and and their current value you can type

gtset show

To change an option type gtset and the option name, followed by the value.

gtset targetLanguage fr

You can take advantage of the new possibility to translate to several target languages at once. If you, for example, need to translate to english and french regularily, you can just set the default target languages like this:

gtset targetLanguage en,fr

If the default value "auto" for your source language is not working well for you, it is possible to set your default source via

gtset sourceLanguage de

To set any option back to it's default value, you can simply set "default" as value.

gtset sourceLanguage default

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
  • pt-BR = Brazilian 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

Issues· 13 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

PHPalfredphpworkflow

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言