# 启动

- StarDict Manual V3.0.6

- 2.1.Starting StarDict
- 2.2.StarDict Main window
- 2.3.Definition area toolbar
- 2.4.通知栏图标
- 2.5.选中区取词
- 2.6.WordPick Adobe Acrobat plugin
- 2.7.Full-Text Translation

## 2.1.Starting StarDict

你可以从以下几种方式启动星际译王 :

应用程序菜单

  选择附件 ▸ 星际译王。

命令行

  输入stardict，然后按回车键。

  You can specify a word to query too:

  stardict word

  or a Glob-style pattern matching string:

  stardict wo?d*

  or do a fuzzy query:

  stardict /word

If StarDict is already running. In Windows edition StarDict activates the first instance of StarDict, then terminates. In Gnome edition StarDict actives the first instance of StarDict, queries the word in that instance if one was supplied on the command line, then terminates.

See 第7.1节 ― Command line options for complete description of command line options.

## 2.2.StarDict Main window

When you start StarDict, the following window appears.

图 1 StarDict Main Window

The StarDict Main window consists of the following elements:

Top bar

  The top bar consists of the Search field and a number of buttons. Here they are in the order from left to right.

  Clear

    Clears the Search field.

  Search field

    Use the Search field to enter the word that you want to look up. You can also access recently-queried words through the dropdown box.

  Fuzzy Query

    Fuzzy queries the word entered into the Search field.

  Go Back

    Go back to the word you queried before. Right-click to see a list of words you queried earlier.

  Main menu

    A button on the right end of the Top bar. It pops up the StarDict Main menu.

Left bar

  The Left bar contains a number of buttons, here they are in the order from top to bottom:

  单词列表

    Opens a list words that have been found in search.

  Results list

    Opens a list of sources, mainly dictionaries, where the current word has been found. The Definition area combines results from all the sources. Clicking a source in the list scrolls the Definition area window to the definition from that source.

  Full-Text Translation

    Switches to the Full-text translation mode that allows to translate blocks of text, see 第2.7节 ― Full-Text Translation.

  Dictionary groups

    Shows a pop-up menu that allows to select a group of dictionaries where to search words. The menu also contains a checkbox to enable network dictionaries. See 第4.2.1节 ― Net Dict for information about network dictionaries and how to configure them.

  Previous word and Next word

    These buttons are at the bottom part of the Left bar. They work with the Word list and allow to switch to previous and next words in the Word list.

Bottom bar

  The left part of the bar in the order from left to right:

  Scan selection checkbox

    Enable and disables the Scan mode. Checking the Scan selection check button will cause StarDict to automatically look up words that you highlight in any application. See 第2.5节 ― 选中区取词 for more details about the Scan mode.

  Info

    Shows an introduction to using StarDict in the Definition area.

  Quit

    Quits StarDict.

  The right part of the bar in the order from left to right:

  Internet search

    Click the button to initiate Internet search. By default, the first website is used, but you may select any configured website right-clicking the button. StarDict queries the word in the Search field sending a GET request to the configured web page. Result are shown in a web browser. To configure the list of websites see 第4.3.3节 ― Search website.

  StarDict project website

    Opens StarDict project website in a web browser.

  Manage dictionaries

    Opens Manage dictionaries dialog that allows to configure dictionaries to use, organize them in groups and more.

  首选项

    Opens the Preferences dialog that allows to configuration a multitude of parameters pertaining to StarDict. See 第4节 ― 首选项.

单词列表

  The smallest half of the StarDict Main window on the left. It contains a list of words that have been found in search. Click a word to show the related articles in the Definition area. You may use a spliter in the middle of the StarDict Main window to divide the space between the Word list and the Definition area.

释义区

  The largest half of the StarDict Main window on the right. StarDict displays definition of a word in this area of the window. You may use a spliter in the middle of the StarDict main window to divide the space between the Word list and the Definition area. The Definition area has its own bars: a top toolbar (see 第2.3节 ― Definition area toolbar) and a bottom search bar (only visible when you search in the Definition area).

The following hotkeys are available in the Main window.

Hotkeys

middle mouse button

  This hotkey applies to the Definition area only.

  Query the text selected in the Definition area into the Main window. In Windows edition of StarDict, if there is no selected text, query clipboard content into the Main window.

right mouse button

  Show pop-up menu.

## 2.3.Definition area toolbar

The Definition area toolbar is at the top of the Definition area. It contains a number of buttons. Here they are in the left-to-right order.

Hide(Show) the Word list

  Hide or show the Word list or the Results list, depending on what is active now.

Copy

  Copy the Definition area text into clipboard, all the text.

Pronounce the word

  This is a button with an additional dropdown menu. Clicking the button you make StarDict pronounce the current word using the first TTS engine that can do that. The dropdown menu allows you to select the TTS engine to use.

  TTS engines
  Real People TTS

    This engine use sound samples performed by real people.

  Espeak TTS

    Espeak TTS plugin.

  Festival TTS

    Festival TTS plugin.

  Command TTS

    TTS command you may specify in the Preferences dialog. See 第4.1.5节 ― 音效.

  Depending on configuration settings, installed plugins and other factors, the list of TTS engines may be shorter.

Save to file

  Save Definition area text into a file. The new text is appended to the end of the file. The file to use is specified in the 第4.1.4节 ― Export section of the Preferences dialog. You may also specify to export only the found word, not its definition. StarDict exports not the word you searched for but the word that was found, the one which translation is shown in the Definition area. When "export only word" is not specified, selection is taken into account. When text is selected in the Definition area, the selected text is exported prepended with the found word. When there are no selected text, all text of the Definition area is exported.

  Hotkey: Alt+e

Search in the Definition text

  Search for text in the Definition area. This button opens the Definitiona area Search bar at the bottom of the Definition area where you may type a word to search.

  Hotkey: Ctrl+f

## 2.4.通知栏图标

StarDict will also add an icon to the Notification area. When you iconify the Main window, the window will be hiden. After you click the icon, the window will be shown again. If you right click this icon, it will popup a menu where you can choose to toggle Scan selection, or to Quit. You can toggle Scan selection directly by ctrl-clicking the icon. Clicking the middle mouse button on the icon will query the selected word.

图 2 星际译王的通知栏图标

## 2.5.选中区取词

StarDict can automatically scan selections. This means that when you select a word or phrase in StarDict or in any other application, StarDict will get the text that you selected and search for it, then display the Floating window containing the result of the search.

In Windows the Scan mode works differently. It has nothing to do with selection in fact. StarDict extracts the text under the pointer when you pause the mouse for a while. Normally StarDict looks up a word under the pointer, if the pointer is not over a word, then words to the left and the right of the pointer are considered. It is time to say what StarDict considers as a word. StarDict gives a number of tries. First, it considers a word may include anything but spaces and punctuations; second, a word consisting of only letters; a word of lower case letters; a word of upper case letters; a capitalized word of letters. Finally, StarDict uses one of the tried word to find the longest prefix making a word. You may help StarDict to extract the right word or a part of a word selecting it. Although StarDict does not work with selections, selection may effect the text StarDict gets.

Scanning in Windows may not work with some applications. For example, it's known that scanning does not work with FireFox 3.x and Windows Console (cmd.exe process). The scanning feature depends on the way application outputs text. If scanning does not work, you may harness another StarDict feature ‒ Clipboard scanning, see 第4.1.1节 ― 选中区取词.

In Windows StarDict works specially with some applications. First, StarDict itself. To scan a word in StarDict Main window you need to select it. The Scan mode in StarDict Main window works exactly as it should in general case, the fact that it's Windows does not matter. You can not scan in other StarDict windows however.

Second, there is special plugin to scan in PDF documents, see 第2.6节 ― WordPick Adobe Acrobat plugin.

图 3 StarDict Floating Window
Usage tips

- You may drag the Floating window to move it.
- The Floating window will disappear when you move your pointer some distance away.
- You may configure StarDict so it will do scanning only when a special modifier key is held down. See 第4.1.1节 ― 选中区取词.
- You may switch the Scan mode on and off by pressing the Ctrl+Alt+x shortcut. See 第4.1.1节 ― 选中区取词.
- StarDict remembers the last text looked up in the Floating window and will not lookup it again. If you need to see the translation again, you should lookup another word first (it's not enough to simply change selection) and then lookup the original word. Another possibility is to middle-click on the Notification area icon, StarDict will lookup the selection unconditionally.

The StarDict Floating window consists of the following elements:

Tool buttons bar

  A bar at the top of the Floating window. The bar will be hidden automatically to save display space. When your mouse pointer enters the Floating window, the Tool buttons bar will appear immediately, and disappear again as the mouse pointer leaves.

  You can click these buttons to query a word in the Main window, copy the query result to clipboard, pronounce the word, stop selection scanning, etc. To the far right is the Lock floating window button. If the Floating window is locked, it will always be shown there.

释义区

  查询的结果会在这个区域显示。

## 2.6.WordPick Adobe Acrobat plugin

StarDict includes an Abode Acrobat plugin that can be used to extract and translate text from Portable Document Format (PDF) documents. The WordPick plugin is available in Windows edition of StarDict only. The main text extration mechanism does not work with PDF documents in Windows.

Limitations

WordPick plugin requires non-free edition of Acrobat like Acrobat Stardard, Pro or richer, it does not work with the free Acrobat Reader product. The plugin is know to work with versions 7-9 of Acrobat. PDF document security restrictions must allow extracting document content.

WordPick plugin embeds an icon into the stardard Acrobat toolbar near the Hand Tool. In Acrobat Reader you will not see that icon ‒ plugin is not available. If the current document does not allow for text extraction, the icon is disabled, the plugin is not operational.

图 4 Adobe Acrobat Toolbar with WordPick plugin icon
How to inspect document security permissions

In the main menu open File, Document properties. Document properties dialog pops up. Proceed to Security tab. Look into Document Restrictions Summary group. Content Copying or Extraction must be allowed.

Translate text with WordPick plugin

1. Select WordPick and Select tools. Cursor changes to a vertical bar. Now you can select text with mouse.
2. Start StarDict if you have not already done that, and enable Scan mode.
3. Select a word in the PDF document, StarDict shows the Floating window with translation if the word is found.

You may select consecutive words and phrases. If StarDict is unable to find the phrase, it tries to cut words from the end. You will be shown translation of the first word if nothing else has been found.

Note that the Scan modifier key (第4.1.1节 ― 选中区取词) has no effect in Acrobat. WordPick search for text when you select something in the document regardless of the state of modifiers. To turn off the text translation mode, deselect the WordPick tool on the toolbar, deselecting the Select tool is not necessary.

## 2.7.Full-Text Translation

StarDict provides full-text translation service. It allows you to translate short texts with up to 2000 characters approximately. The exact limit depends on the translation engine and other factors. To switch to Full-Text Translation mode click the Full-Text Translation button on the Left bar in StarDict Main window.

StarDict uses online translation services available for free on the Web to perform translation. StarDict collects text, source and target languages, constructs an HTTP request and sends it to online translation service. The application receives response of the service and shows results in a window. You may see StarDict interface to Full-Text Translation service below.

图 5 Full-Text Translation Mode

The top line of the window from left to right contains: engine selection combobox, source language combobox, and target language combobox. Below you see a text area for the text to translate. The bottom part of the window contains a text area for translation results. The Translate button in the middle of the window initiates translation request. The bottom line of the window provides a link to the online translation engine. It opens in a web browser.

To translate something, first select a translation engine. You have the following choice: Google, Yahoo, Excite Japan. Select source and target languages. Available source and target languages depend on selected engine. Available target languages depend on source language as well. Type the text to translate into the source text area. Click the Translate button to start translation. You'll see results in the result text area. Sometimes it may show you Not found! text. It means that translation failed. There can be a number of reasons: source text is too long, the online service is down, the service has changed output format and StarDict is unable to parse it. You may see other errors in the results area.