All Projects → condy0919 → fanyi.el

condy0919 / fanyi.el

Licence: GPL-3.0 License
Not only English-Chinese translator for Emacs.

Programming Languages

emacs lisp
2029 projects
Makefile
30231 projects

Projects that are alternatives of or similar to fanyi.el

MouseTooltipTranslator
chrome extension - When mouse hover on text, it shows translated tooltip using google translate
Stars: ✭ 93 (+138.46%)
Mutual labels:  translator, dictionary
ucast
Conditions query translator for everything
Stars: ✭ 76 (+94.87%)
Mutual labels:  translator
RepositoryHelpers
📦 Extensions for HttpClient and Custom Repository based on dapper
Stars: ✭ 22 (-43.59%)
Mutual labels:  dictionary
dict
My dictionary for simplicity, intelligence, and beauty.
Stars: ✭ 22 (-43.59%)
Mutual labels:  dictionary
RTranslator
RTranslator is the world's first open source real-time translation app.
Stars: ✭ 59 (+51.28%)
Mutual labels:  translator
amelia 2.0
An Artificial Intelligence Chat Bot and Service Provider written in Python and AIML.
Stars: ✭ 19 (-51.28%)
Mutual labels:  dictionary
yomu
英和辞書付きPDF閲覧ソフト
Stars: ✭ 48 (+23.08%)
Mutual labels:  dictionary
MyGoldenDict
My personal goldendict-dictionaries collection
Stars: ✭ 13 (-66.67%)
Mutual labels:  dictionary
NMSAlphabetAndroidApp
An unofficial translator app for No Man's Sky
Stars: ✭ 22 (-43.59%)
Mutual labels:  translator
oxford dictionary
📙 A Ruby wrapper for the Oxford Dictionary API
Stars: ✭ 23 (-41.03%)
Mutual labels:  dictionary
react-translator-component
React language translation module for developing a multilingual project.
Stars: ✭ 13 (-66.67%)
Mutual labels:  translator
kbbi4
Official kbbi5 for Android
Stars: ✭ 26 (-33.33%)
Mutual labels:  dictionary
WiBr
Wifi Bruteforce (WiBr) is a wifi cracking tool written in c#.
Stars: ✭ 56 (+43.59%)
Mutual labels:  dictionary
hujiang dictionary
日语词典/英语词典/终端词典/沪江小d/沪江小d API
Stars: ✭ 40 (+2.56%)
Mutual labels:  dictionary
ciba
linux下的划词翻译工具
Stars: ✭ 27 (-30.77%)
Mutual labels:  dictionary
gdict
A command line dictionary written in golang powered by multi engines.
Stars: ✭ 21 (-46.15%)
Mutual labels:  dictionary
bilisim sozlugu
Translating computer words from English to Turkish
Stars: ✭ 28 (-28.21%)
Mutual labels:  dictionary
unofficial-jisho-api
Encapsulates the official Jisho.org API and also provides kanji, example, and stroke diagram search.
Stars: ✭ 88 (+125.64%)
Mutual labels:  dictionary
jetbrains-polish-dictionary
Polish dictionary for JetBrains' IDEs
Stars: ✭ 63 (+61.54%)
Mutual labels:  dictionary
bing-translate-api
A simple and free API for Bing Translator for Node.js
Stars: ✭ 37 (-5.13%)
Mutual labels:  translator

build License Supports Emacs 27.1-28.x MELPA

fanyi.el

fanyi.el is a simple yet powerful multi-dictionaries interface for Emacs, currently it includes:

fanyi.el has integrations with:

  • imenu, M-x imenu to jump to dictionary section directly.
  • bookmark, C-x r m to make a bookmark for current query word which turns bookmark into a vocabulary notebook.
  • outline-mode, TAB to collapse on section.
  • ol (org-link), org-store-link on a fanyi buffer, the link can be inserted later via org-insert-link. It's accomplished by introducing a fanyi link type. e.g., C-c C-o on [[fanyi:happy][description of happy]] will invoke a fanyi search. Since ol depends on org package, this integration needs an explicit (require 'ol-fanyi).

Installation

Install fanyi.el from MELPA with:

M-x package-install RET fanyi RET

If you're an American Heritage Dictionary user, make sure Minion New font is installed. Otherwise the pronunciation may be displayed in tofu, or an all-the-icons icon if you have all-the-icons installed.

# family: Minion New Bold
# https://ahdictionary.com/application/resources/fonts/MinionNew-Bold.ttf
#
# family: Minion New Italic
# https://ahdictionary.com/application/resources/fonts/MinionNew-Italic.ttf
curl https://ahdictionary.com/application/resources/fonts/MININ___.TTF -o Minion.ttf

# linux
mv Minion.ttf ~/.local/share/fonts/

# macOS
mv Minion.ttf ~/Library/Fonts/

Usage

Call fanyi-dwim, or fanyi-dwim2 if you can confirm the word at point is wanted. A new command fanyi-from-history is introduced to browse the search history.

If you want M-x fanyi to list only fanyi-dwim, fanyi-dwim2 and fanyi-from-history, try

;; Emacs 28 only
(setq read-extended-command-predicate #'command-completion-default-include-p)

Don't customize fanyi-providers via setq, use the custom system instead.

;; If you want English-English dictionary only.
(use-package fanyi
  :ensure t
  :custom
  (fanyi-providers '(fanyi-etymon-provider
                     fanyi-longman-provider)))

;; Default, comment out the providers you don't need.
(use-package fanyi
  :ensure t
  :custom
  (fanyi-providers '(;; 海词
                     fanyi-haici-provider
                     ;; 有道同义词词典
                     fanyi-youdao-thesaurus-provider
                     ;; Etymonline
                     fanyi-etymon-provider
                     ;; Longman
                     fanyi-longman-provider
                     ;; LibreTranslate
                     fanyi-libre-provider)))

;; For non-`use-package' users
(custom-set-variables
 '(fanyi-providers '(fanyi-haici-provider
                     fanyi-youdao-thesaurus-provider
                     fanyi-etymon-provider
                     fanyi-longman-provider
                     fanyi-libre-provider)))

If you're a Windows user,

(setq fanyi-sound-player-support-https t)

may be helpful since - is interpreted as stdin is an UNIX convention. If fanyi-sound-player-support-https is non-nil, the url will be passed to fanyi-sound-player directly.

FAQ

  1. Audio button icon displayed in tofu. The icon is emoji, install the proper font to display it. If you use archlinux, yay -S ttf-symbola without additional settings. For MacOS users, add the following elisp to your Emacs config.

    ;; "Apple Color Emoji" is bundled with MacOS.
    ;;
    ;; Emacs 29, 28
    (set-fontset-font t 'emoji (font-spec :family "Apple Color Emoji") nil 'prepend)
    
    ;; Emacs 27
    (set-fontset-font t 'symbol (font-spec :family "Apple Color Emoji") nil 'prepend)
  2. Longman throws an user-error It's expected. File an issue please.

Screenshots

status indicator 海词 分布 Etymon American Heritage Longman 有道翻译英文 有道翻译中文 有道同义词英文 有道同义词中文

Similar projects

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].