Currently I use Ubuntu as main operating system, it is based on Gnome, but I was missing a great software when I was using KDE few years ago. This is Ktranslator a great translator software developed by a Brazillian guy.
Using Ktranslator you just select the word you want to translate and press Ctrl, then will appear a pop-up showing the translation.
Hopefully there is Ktranslator on Ubuntu repository:
$ sudo apt-get install ktranslator
Now you need to install dictionaries, we can use a free dictionary, but Babylon dictionary is more complete. Then first download BGL files (Babylon_English_Portuguese.BGL and Babylon_Portuguese_English_dic.BGL), I will not point you to site where you will find it, just search on google, you will find a page with many BGL files.
Now you need to convert it to .dic, first install the converter:
$ sudo apt-get install dictconv
Now execute the converter tool:
$ dictconv -o Babylon_English_Portuguese.dic Babylon_English_Portuguese.BGL
Remove some unused characters:
$ cat Babylon_English_Portuguese.dic | sed 's/\$[0-9][0-9]*\$\t/\t/' > Babylon_English_Portuguese_novo.dic
Now convert it to Startdict format, first install stardict tools to get to converter:
$ sudo apt-get install stardict-tools
Then run the converter:
$ /usr/lib/stardict-tools/tabfile Babylon_English_Portuguese_novo.dic
It will create 3 files:
Babylon_English_Portuguese_novo.dict.dz Babylon_English_Portuguese_novo.idx Babylon_English_Portuguese_novo.ifo
This is time to run ktranslator application, it will ask to configure the directory. Then choose an intuitive name as Babylon_English_Portuguese and press Next. Now select Stardict format and browser to the directory where you place the above files.
Ktranslator will filter other files, you will see only the “Babylon_English_Portuguese_novo.ifo”, select this one and complete the instalation.
Now you can select any word and press Ctrl to get it translated instantaneously.
Source: This page was very useful