/zhongwen

Official source code of the "Zhongwen" Chrome extension

Primary LanguageJavaScriptGNU General Public License v2.0GPL-2.0

中文 Zhongwen

A Chinese Pop-Up Dictionary and Learning Tool

This browser extension allows you to translate Chinese characters and words by simply hovering over them with the mouse.
It also contains useful features for learners of the Chinese language.

Chrome Firefox

Highlights

  • Supports both traditional and simplified characters.
  • Includes a recent version of the widely used CEDICT Chinese English dictionary.
  • Displays Hanyu Pinyin along both the simplified and traditional characters, however only showing either simplified or traditional characters can be configured as an option.
  • As a learning aid it uses different colors for displaying the Pinyin syllables, depending on the tone of the Chinese character.
  • Can be turned on and off with a single mouse-click.
  • Highlights the characters whose translation is displayed in the pop-up window.
  • Also supports keyboard navigation for translating the next character, the next word, or the previous character.
  • Allows you to add words to a built-in word list. Words from this list can be exported to a text file for further processing, such as importing the words into Anki.
  • Includes links to grammar and usage notes on the Chinese Grammar Wiki.
  • Supports exporting words to the Skritter vocabulary queue.

Installation

Chrome

The Zhongwen Chrome extension is available via the Chrome Web Store:
https://chrome.google.com/extensions/detail/kkmlkkjojmombglmlpbpapmhcaljjkde

Simply click on the "Add to Chrome" button to start the installation.

Firefox

The Zhongwen Firefox extension is available via the Firefox Add-Ons site:
https://addons.mozilla.org/en-US/firefox/addon/zhongwen

Simply click on the "Add to Firefox" button to start the installation.

How Does It Work?

Once Zhongwen is installed on your computer you'll see a little icon showing the Zhongwen logo near the upper right-hand corner of your browser. By clicking on this icon you can turn the extension on and off. Click on it and wait until you see the word "On" displayed in red and white on top of the icon. This tells you that the dictionary is active. If you want to turn it off again, just click on the icon again and the red "On" label disappears. So with a single mouse-click you can activate or deactivate the dictionary.

Once Zhongwen has been turned on, showing the red "On" label on the icon, you can go to a web page in Chinese and point your mouse at some Chinese characters. A pop-up window opens up automatically showing you the translation of the word you were pointing at.

Zhongwen can translate both simplified characters as well as traditional characters.

What Information Does It Show?

By default, the pop-up window shows the following pieces of information:

  • The Chinese characters forming the word you're pointing at with your mouse. If the simplified and the traditional forms differ, then both forms are shown.
  • The corresponding Pinyin. The individual Pinyin syllables are shown in different colors (see below).
  • The English translation. Sometimes, Zhongwen finds more than one matching entry in its dictionary. In this case it shows you all of the matching entries.

Zhuyin

If you want to see Zhuyin, a.k.a. Bopomofo, you can enable it via the options page.

Chinese Grammar Wiki

Zhongwen also allows you to learn more about Chinese grammar and usage. If Zhongwen knows that there's an entry at the Chinese Grammar Wiki for the entry you're just looking at, it will show you the following text at the bottom of the pop-up window: 'Press "g" for grammar and usage notes.' If you then press G on your keyboard, a new tab will open in your browser and it will take you directly to the corresponding page in the Chinese Grammar Wiki.

Why Is Pinyin Shown in Different Colors?

If you're learning Chinese, Zhongwen helps you remember the tone of each character by displaying it in a different color. By default it uses the following color scheme for showing Pinyin syllables:

  • First tone syllables are shown in red.
  • Second tone syllables are shown in orange.
  • Third tone syllables are shown in green.
  • Forth tone syllables are shown in blue.

Keyboard Navigation

Some users don't use Zhongwen to look up individual words, they want to read an entire paragraph or article. In this case, rather than having to trace all the words with the mouse, you can use Zhongwen's built-in keyboard navigation support: You can move from character to character or from word to word by pressing keys on your keyboard:

  • Pressing N on the keyboard takes you to the next word.
  • Pressing B takes you back one character.
  • Pressing M moves to the next character. (This is different from pressing N if you're currently over a word that consists of two or more characters.)
  • Sometimes the pop-up window is hiding the text you're looking at. You can move it out of the way using X and Y on the keyboard (this moves the pop-up window up or down), or hit A once or twice to move it to an altogether different location.

Built-in Word List

So now that you can look up all those words when reading Chinese web sites, wouldn't it be nice to add the new words you want to remember to some list that you can use for studying? Zhongwen let's you do that, too! It has a built- in word list feature. You just need to press R (short for "remember") on your keyboard and the entries you're looking at in the currently opened pop-up window will be added to the built-in word list. How do you get to see this list? It's easy, you need to use press the Alt and the W key on your keyboard (Alt + W). The word list will then open in a new tab.

Can I export the dictionary entries into a spreadsheet or import them into Anki?

Yes, if you want to copy the current dictionary entry, including the Chinese characters, Pinyin, and the English translation, to the clipboard, just hit C on the keyboard to copy to the clipboard. (Note: This is different from using Ctrl + C on a PC or ⌘ Command + C on a Mac, which only copies the Chinese characters without the translation.) When you paste the clipboard into Excel or an OpenOffice spreadsheet, the individual components of the entry are nicely put in different columns and rows. From there you can also import them into Anki. (See the Anki manual for further details.)

Skritter Support

If you're studying Chinese characters using Skritter you can easily add Chinese words to your vocabulary queue: just hit S on the keyboard. This opens up a new tab that takes you to the Skritter web site. If you're not logged into Skritter you'll see the login page. After you're logged in, the word is automatically added to your study queue.

Context Menu Items

When Zhongwen is enabled, you can right-click on a page to open the browser's context menu. There will be a menu item for Zhongwen which you can use to access a new tab showing a helpful summary of all the keyboard shortcuts. Another menu item can be used for opening the word list as an alternative to the Alt + W keyboard shortcut.

What Built-In Dictionary Does It Use?

Zhongwen comes with a recent release of the CC-CEDICT dictionary. This dictionary is constantly updated, and each Zhongwen release will include an updated version of the dictionary.

Support for Online Dictionaries

Sometimes, in addition to looking at the translation in the pop-up window, you might want to look up a word in one of the freely available online dictionaries. Zhongwen lets you quickly do that by some simple keyboard shortcuts.

  • Alt + 1 looks up the selected word using LINE Dict.
  • Alt + 2 lets you look up the pronunciation on Forvo.
  • Alt + 3 takes you to Dict.cn.
  • Alt + 4 uses iCIBA.
  • Alt + 5 looks up the word in the MDBG dictionary.
  • Alt + 6 takes you to JuKuu.
  • Alt + 7 takes you to MoeDict.
  • T is for looking up example sentences at Tatoeba.

Your browser will open a new tab and the word that was shown in the pop-up window will be looked up in the corresponding online dictionary listed above.

More Options

Zhongwen also has an options page which allows you to configure certain aspects of its behavior. In order to get there just right-click on the Zhongwen logo in the upper right-hand corner of the browser and choose "Options". A new tab will open showing you all the available options with a brief explanation of each one.

Legal

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.


Copyright (C) 2019 Christian Schiller