Polyglot for NVDA

Polyglot is an NVDA global add-on focused on fast, flexible multilingual translation. It can translate selected text, clipboard content, and the last text spoken by NVDA, and it can also intercept spoken content for live auto-translation.

The add-on is built around a dynamic engine architecture. Translation engines declare their own capabilities and configuration schema, and the settings UI is generated from that schema at runtime. That keeps the core plugin small while making it straightforward to add new services.

What It Does

Installation

The preferred installation path is the NVDA Add-on Store. You can also install manually:

  1. Download the latest .nvda-addon package from the Releases page.
  2. Open the downloaded file.
  3. Confirm installation in NVDA.
  4. Restart NVDA when prompted.

Quick Start

  1. Open NVDA menu -> Preferences -> Settings -> Polyglot.
  2. Choose a translation engine and make sure it is enabled.
  3. Configure any required credentials for that engine.
  4. Set source and target languages.
  5. Optionally enable clipboard copy and the smart speech filter.
  6. Press NVDA+Alt+Z, then use one of the command-layer keys below. Press H in the layer to show command layer help.

Command Layer

Press NVDA+Alt+Z to enter the command layer. A short beep confirms that the layer is active. Press H in the layer to show command layer help. Most commands execute once and exit the layer. Language and engine switching commands stay inside the layer so you can continue cycling. Engine switching cycles through enabled engines only.

Key Action
T Translate the current selection.
Shift+T Translate the current selection in reverse.
B Translate clipboard text.
Shift+B Translate clipboard text in reverse.
L Translate the last text spoken by NVDA.
Shift+L Translate the last text spoken by NVDA in reverse.
S Next source language.
Shift+S Previous source language.
G Next target language.
Shift+G Previous target language.
E Next enabled engine.
Shift+E Previous enabled engine.
W Swap source and target languages.
A Announce the current engine and language pair.
C Copy the last translation result.
V Toggle auto-translation.
I Open the interactive translation dialog.
O Open Polyglot settings.
X Clear the translation cache.
H Show command-layer help.

Interactive Translation Dialog

The interactive dialog is designed for longer text and iterative translation work.

Local English Word Definitions for Chinese NVDA

When NVDA’s interface language is Chinese, including Simplified and Traditional Chinese, Polyglot adds an offline English-to-Chinese dictionary to the command that reports the word at the review cursor:

  1. Press numpad5 once in the desktop keyboard layout to read the word at the review cursor.
  2. Press it twice to hear the word spelled out.
  3. Press it three times to hear the Chinese definition when the complete word is found locally.

Add-ons that call NVDA’s speech.spellTextInfo receive the same behavior. If a line contains only one English word, pressing the current-line command three times also reports its definition. Lookup handles one layer of common leading or trailing sentence punctuation, safe spelling variants, and common plurals, tenses, participles, comparatives, and superlatives. Exact entries take priority. When a spelling can refer to several entries, Polyglot announces up to three candidates with their first senses. If a two- or three-character uppercase word only matches a lowercase entry, Polyglot reports the possible lowercase meaning and warns that it may instead be an abbreviation. Words that look valid but are not included are reported as missing. Single characters, multiword lines, and unsupported text keep NVDA’s original character descriptions. Lookup is fully local and never sends the word to a translation service.

The Translate Selection, Translate Clipboard, and Translate Last Spoken commands also use the local dictionary for complete English words in English/auto-detect → Simplified or Traditional Chinese requests, and for English-word input in Chinese → English requests. Other content continues through the selected translation engine.

Translation commands and text review have separate local-dictionary options. Both are enabled by default; disabling either restores that command’s original behavior.

Current dictionary size:

Settings Guide

Common Settings

Shared Engine Settings

Most engines inherit a common set of settings:

If an engine reports detected source language, Polyglot also exposes:

Auto-Translation Behavior

LLM and Polyglot-Specific Options

Some engines expose additional controls:

Chrome AI Offline Translation

Polyglot can use Chrome’s built-in Translator API for offline translation. Translation is handled by an isolated local Chrome instance, so the text is not sent to a third-party translation service.

Requirements

How To Use

Select Chrome AI (Offline) in Polyglot settings, then choose the source and target languages. Chrome AI requires an explicit source language; Auto-detect is not available for this engine, so Polyglot can check the required model before starting Chrome.

On first use, if the required model is not installed, Polyglot asks how to proceed. Choose Yes to download and install the model with Polyglot’s model manager; use this if Chrome’s model download service is slow, blocked, or unreliable on your network. Choose No to let Chrome download the model. Choose Cancel to cancel the current translation. After the model is ready, translation continues automatically.

Network And Models

Translation runs locally. Models can be installed by Polyglot’s model manager or downloaded by Chrome. If Chrome’s model download service is slow or unavailable on your network, choose Yes in the prompt, or open the Polyglot ChromeAI model manager from NVDA’s Tools menu to install or remove offline models in advance.

Privacy And Data

Polyglot uses a separate Chrome data directory for Chrome AI, so it does not affect your regular Chrome profile. Models, cache data, and runtime data are kept to avoid repeated downloads.

The default location is:

%LOCALAPPDATA%\Polyglot\ChromeAI

If the LOCALAPPDATA environment variable is not available, Polyglot falls back to the polyglot_chrome_ai directory under the NVDA configuration directory.

When NVDA exits, Polyglot closes the Chrome instance it started.

Limitations

Engine Overview

The repository currently includes the following engines:

Engine Credentials Notes
Baidu Translate Baidu app ID and secret Standard vendor API integration.
Caiyun Caiyun token Standard vendor API integration.
Chrome AI (Offline) None Uses Chrome’s built-in Translator API with local models; select the source language explicitly.
DeepL DeepL API key Standard vendor API integration.
Google Translate (key-free) None Supports an optional mirror endpoint toggle.
Google Translate (Polyglot) Configurable API key and endpoint Ships with default endpoint values in code; availability depends on service status.
Lingva Translate None Public Lingva endpoint, no language-detection reporting in responses.
Microsoft Translator (key-free) None Fetches a temporary token automatically.
Niutrans Niutrans API key Standard vendor API integration.
Ollama 1 Ollama URL, model name, optional key First saved Ollama profile.
Ollama 2 Ollama URL, model name, optional key Second saved Ollama profile.
OpenRouter OpenRouter API key Supports model presets and editable prompt templates.
Tencent Translate Tencent secret ID and secret key Standard vendor API integration.
Tencent Translate (Polyglot) NVDACN username and password Polyglot-backed Tencent route.
VIVO Translate NVDACN username and password Limited language set, no auto-detect source language.
Volcengine (Polyglot) NVDACN username and password Polyglot-backed Volcengine route.
Yandex Translate None Public-style endpoint, no detected-language reporting.

Contributing

Contributions are welcome across code, documentation, localization, testing, and engine integrations.

When adding a new engine:

  1. Create a module under addon/globalPlugins/polyglot/services/engines/.
  2. Implement TranslationEngine or, for HTTP engines, extend BaseHttpEngine.
  3. Return a config spec from getConfigSpec() if the engine needs settings.
  4. Use supported control types from views/factory.py: choice, text, password, checkbox, and spinctrl.
  5. Verify the engine appears correctly in the dynamic settings panel and, when enabled, command-layer switching and the interactive dialog.

License

Copyright (C) 2025-2026 cary-rowen.

This project is licensed under the GNU General Public License version 3 or later (GPL-3.0-or-later). See the repository’s COPYING.txt.