This program provides some interactive functions in order that we can easily request the text translation between English and Japanese to multiple Web translation services. These functions were implemented using
‘url-retrieve’, so the responses will be displayed asynchronously in the popup window.
This program is tested on GNU Emacs 22, 23.
First, save this file as trans-ej.el and byte-compile in a directory that is listed in load-path.
Put the following in your .emacs file:
To translate the buffer text, select region you desire, and just type as:
If you want to display the results of
‘trans-ej’ command in a tooltip instead of a buffer popped up, install postip.el and add the following to .emacs file:
(require 'pos-tip) (setq trans-ej-string-all-display-function nil trans-ej-string-all-update-function (lambda (buf) (pos-tip-show (with-current-buffer buf (buffer-string)) nil nil nil 0 80)))
‘url-retrieve’. – irie