Skip to content

zevlg/multitran.el

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 

Repository files navigation

multitran.el

This file is automatically generated from multitran.el by GitHub#ellit-org.el tool. Do not edit manually.

multitran.el is a zero-dependancy interface to http://multitran.com online dictionary.

multitran.el supports tons of languages, including such languages as: Esperanto, Latin and Luxembourgish. See full languages list, and feel free to add new languages to `multitran-languages-alist’ if you missing one.

Use M-x multitran RET to get the translation for the word at point. Specify C-u prefix arg to interactively select translation languages.

Installing

Install from MELPA using M-x package-install RET multitran RET.

Make sure your MELPA package archive is up-to-date with M-x package-refresh-contents RET

Variables to customize

You can customize multitran.el with M-x customize-group RET multitran RET using Emacs Easy Customization Interface

Or just tweak following user options in your init.el:

  • User Option: multitran-languages

    Pair of languages for translation, for example ("Russian" . "English") for russian <-> english translation.

  • User Option: multitran-header-formatters

    List of format functions to compose multitran header.

    You might want to add your custom formatters, such as:

    (defun my-multitran--hf-wordfreq ()
      "Show word's frequency rank."
      (let ((wfreq (wordfreq-find (or multitran-word ""))))
        (and wfreq (format "FRank: %S" (cadr wfreq)))))
    
    (setq multitran-header-formatters
          '(miltitran--hf-word multitran--hf-languages
            my-multitran--hf-wordfreq multitran--hf-history))
        

    Where wordfreq-find is from wordfreq.el

Integration with avy

multitran can be be integrated with avy actions. For example:

(cl-pushnew (cons ?M 'multitran-at-pos) avy-dispatch-alist)

History

Version 0.5.1:

  • Parse #8 color
  • Get rid of <nobr> tag in subjects

Version 0.5.0:

  • Adapt to multitran.com API changes, thanks to @avityazev
  • Rip off links to images

Version 0.4.16:

  • Use :extend attribute for the multitran-section-face face.

Version 0.4.15:

  • Fixes due to multitran.com API change

Version 0.4.14:

  • Fixes due to multitran.com API changes
  • Title format has been changed, so we multitran adopted regex to extract word from the title.

Version 0.4.11:

  • Use word-at-point instead of current-word for better word at point recognition.
  • Integration with avy by providing multitran-at-pos function.

Version 0.4.10:

  • Support for symbols like &#8658; seen in “go” translation
  • Support for <a target=xxx ...>, seen in “the” translation

Version 0.4.1:

  • Select custom languages if C-u is supplied to M-x multitran RET
  • Fixes due to multitran.com API changes

Version 0.4:

  • Use last translation word if no current word
  • Parse “English thesaurus” anchor for abbr look like words, for example M-x multitran RET sath RET
  • Show “Can’t translate” messsage instead of “Search failed: Suggest: <a href=[^<]+</a>”
  • Save multitran-languages in history
  • multitran-prev-link implemented, now <backtab> is working
  • Infinite loop bug fixed in multitran-next-section

Version 0.3:

  • Parser for reliability-of-translation span
  • Workaround some html bugs (triggered by en-de translations)

Version 0.2:

  • Support for header-line-format
  • Support for suggestions
  • Many languages added

Version 0.1:

  • Base port of some rdict.el functionality
  • html parsers