manzyuk/google-translate — pull request #9 by atykhonov (2014-01-20 03:14:27+00:00)
Title: Translate a text using translation directions.

Motivation
-------------
I'm still not happy with the current google-translate.el implementation. I use to use for translations three languages: English, Ukraine and Russian. For now, as for me, google-translate.el supports _two_ languages very well. I could describe these languages by means of ```google-translate-default-source-language``` and ```google-translate-default-target-language```. I've put to them "en" and "ru" respectively. But when I would like to translate to (or from) Ukrainian, before executing command for translation, I need to use "C-u", then input ```source``` language, then ```target``` language and lastly a text which is going to be translated. This is not quite handy for me. And I would love to have something more usable, to make translation routing a little bit shorter.

Implementation
-------------
The code which you could see below is the attempt to make google-translate.el more usable when using more than two languages. This code is rather about proof of concept than about final version. The path to the final version could be not short and may contain a lot of additional enhancements. I would like to hear your opinion about this code and about conception overall. And in case of positive feedback I would love to continue.

How that does work
-------------
When I execute ```google-translate-query-translate``` command I get a prompt in the minibuffer:

Translate from English to Russian:

Then I could put a text there (in the minibuffer) or change translation direction by means of "C-r" or "C-s" key bindings. In case of such content of ```google-translate-translation-directions-alist``` as you can see in the code, I'll press "C-s" key binding then I get other prompt:

Translate from Russian to English:

I can put a text and change directions on the fly. I can have as many translation directions as I would like to have and change it very easy. Of course there could be implemented ```default``` direction(s) (directions which are used very often) which allow to avoid prompting about languages at all. And, of course, overall current implementation I believe could be significantly improved...

Look forward to receiving your feedback.

Thank you!