NOTE 1: It is assumed that you first copied a paragraph of text into your clipboard. Here I use the translation page from English to Russian (https://translate.google.gr/?hl=el#view=home&op=translate&sl=en&tl=ru&text=) You can use another.
NOTE 2: Automatic translation programs are powerless with translation, for example, technical literature and PDFs, so the process of professional translation looks like this: 1) Copy a paragraph, 2) Paste in Google Translator, 3) Copy the resulting translation, 4) Correct the translation in a text editor, 5) Paste into the original document. Total, we have 5 steps.
NOTE 3: You can automate all steps except the 4th, of course. There are many translation programs, but they are expensive and will never give you the flexibility your own Apple-script’s gives. And, despite their high cost, many of them violate the structure of the PDF and do not make a difference in what needs to be translated and what is not necessary. For example, this topic paid “professional” program will translate along with a piece of applescript, all fucking up
This script only gives you the 2nd and 3rd steps of the professional translation process, but these steps is also the most necessary to create a full-fledged utility. In the future, I will publish a utility that will speed up the process of professional translation. For example, pdf