yinan-c / alfred-translate-it

An Alfred workflow to translate text from any source to any target.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Alfred Translate-It

An Alfred 5 workflow to translate text using OpenAI, DeepL, Google, Bing, Baidu and Youdao. This workflow also supports Universal Actions.

Requirements

  • Alfred PowerPack
  • Python3 (system shipped Python3 not recommended, use other sources like, Homebrew or pyenv installed Python3)
  • Google translation is free and unlimited and requires no dependency, but may fail in mainland China.
  • OpenAI Translation requires OpenAI API
  • DeepL Translation requires DeepL API
  • Other translation services require translators library, install via:
# PYPI
pip install --upgrade translators

# Conda
conda install -c conda-forge translators

# Source
git clone https://github.com/UlionTse/translators.git
cd translators
python setup.py install

Usage

  • Set up: target language, method of translation and your APIs. (Please check supported source language code from DeepL API docs and Translators library)
  • Type anything after keyword trans to translate, it will auto-detect the source language.
  • Then select any result and to copy text to your clipboard
  • ⌘ + ⏎ to view large text (useful if results are long)
  • For universal control, simply select any text and search for translate.
  • Set up basic language configs (base target and keyword) in case you want to add a second translation target, which might be beneficial for bidirectional translation or multilingual support.

Thanks

Any suggestions are welcome!

Please consider buying me a coffee if you find this workflow helpful

Buy Me A Coffee

About

An Alfred workflow to translate text from any source to any target.


Languages

Language:Python 98.3%Language:Cython 1.4%Language:Roff 0.2%Language:Shell 0.0%