Translation Support Tools
Looking at translate-shell and the plasma translator applet
In my work, but also for my hobbies, I quite often come into contact with texts in other languages. I speak some languages myself quite well, but sometimes having support from translation tools comes in quite handy. I’m sure a lot of people can sympathize 🙂
Google Translate has become quite ubiquitous as a support tool for translations. I use it a lot when checking translations, or when I need to translate texts from languages I don’t know. But it’s a website, that runs in a browser. Chromium based browsers can rely on browser integration for Google Translate, which makes translating entire website quite easy, but that too is focused on use cases in the web. When I need to translate something from an ebook, or a local document, etc, copy-pasting to the browser is the usual solution.
Recently though I came across some tools that make local interaction with online translation
services much more userfriendly. One such tool is translate-shell.
translate-shell is a CLI tool that can make sevices like Google Translate or Bing Translate
available on the command line.
translate-shell shows quite a bit of information about the translation. Via various
parameters one can control which of that information should be included. It also supports a
parameter, that shows just the translation itself.
Very handy for a CLI tool and also useful when scripting translations is that
translate-shell is also
able to translate text that it receives as output from other commands.
This is already quite useful, but doesn’t really help with translating content not on the CLI. For that
one would need some kind of UI or intergration into the desktop environment. Thankfully such a thing does
exist for KDE Plasma. The Translator Applet uses
the background and makes it accessible through various additional ways.
For one, there is a widget one can add to the panel, that looks similar to the translation pages of the aforementioned online services.
However, another, quite nifty way to access it is by selecting the text you want to translate anywhere and
then using a global shortcut (I use
Meta + T) to show the translation in a pop-up window.
For Slackware I have packages for both tools and their dependencies in my repository, for now though only in
the repository for Slackware current. The
translate-shell package optionally depends on
plasma-translator depends on