Skip to content

Highlight, translate, show! You always need to translate a text on the fly, this script lets you translate the highlighted text and shows a notification with the original/translated text.

License

Notifications You must be signed in to change notification settings

MuDiAhmed/translate-text-linux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Translate Highlighted Text

Highlight, translate, show! You always need to translate a text on the fly, this script lets you translate the highlighted text and shows a notification with the original/translated text.

Note: The official Google Translate API is not available for free, so this script is using translate.googleapis.com API that is internally used by the Google Translate extension for Chrome and requires no authentication.

Requirements:

Just run sudo apt-get install xsel curl sed mawk

  1. xsel manipulate the X selection.
  2. curl a command line tool and library for transferring data with URLs.
  3. sed a stream editor.
  4. awk a domain-specific language designed for text processing and typically used as a data extraction.

Install:

  1. open terminal
  2. cd <path/to/repo>
  3. ./install

Note: don't run as sudo, but there is an internal command that require sudo, so you will be asked for it

Usage:

Now you will find that there is a keyboard shortcut has been created "Super + t".

  1. Highlight any word on the screen on any window.
  2. Click "Super + t".
  3. A notification pop-up with the translation will appear

About

Highlight, translate, show! You always need to translate a text on the fly, this script lets you translate the highlighted text and shows a notification with the original/translated text.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages