The Translate plugin allows you to translate text from gedit using Apertium and Yandex engines.
Select gedit Preferences Plugins.
Select Translate to enable the plugin.
Select Preferences to configure the translation engine to use and a language pair.
Select the part of text that you would like to translate.
Press CtrlK or use the context menu to translate it.
The translation appears in the document or in the bottom panel, depending on your configuration.