DualRead AI Translator is an open-source Chrome extension for AI bilingual webpage translation. It keeps the original webpage text visible and inserts AI translations nearby, making it easier to read foreign-language news, social posts, Q&A pages, documentation, and long articles without losing source context.
It is designed as a lightweight OpenAI-compatible web translator: bring your own API key, choose a model, translate only the current reading area, and keep token cost under control.
- Bilingual webpage translation: original text stays in place, translation appears underneath.
- Chrome AI translator workflow: translate with OpenAI, DeepSeek, DashScope/Qwen, local models, or any OpenAI-compatible API.
- Viewport-first translation: translate the current screen and nearby content instead of sending the whole page.
- Dynamic page support: keep one translation record across scrolling feeds, expanded posts, source edits, and React-style re-renders without duplicate requests.
- Structure-aware layout: place translations safely in blocks, table cells, lists, Flex/Grid rows, clipped previews, and Web Component layouts without rewriting host layout styles.
- Responsive reading styles: adapt spacing for compact cards, mobile screens, and long articles while respecting RTL and vertical writing modes.
- Auto translate with language skip: translate foreign-language pages automatically and skip pages already dominated by the target language.
- Right-click translation: translate the current webpage or selected text from the context menu.
- Responsive and cost-aware: plain-text streaming per paragraph, small concurrency, per-page budgets, and local paragraph cache.
- Privacy-conscious: no project server, no analytics, no bundled developer API key.
DualRead works best for:
- Reading English news websites with Simplified Chinese translations.
- Translating X/Twitter posts, Reddit threads, Quora answers, and forum pages.
- Reading documentation, GitHub README files, Wikipedia articles, and technical blogs.
- Comparing the original paragraph with the translated paragraph while learning a language.
Default direction: English -> Simplified Chinese. The extension UI supports Simplified Chinese, Traditional Chinese, English, and Japanese.
- Open
chrome://extensions/. - Enable Developer mode.
- Click Load unpacked.
- Select the
dualread-ai-translatorfolder. - After changing code, refresh the extension card and reload the target webpage.
Open the extension popup, click Open settings, then configure:
Provider: OpenAI / DeepSeek / DashScope / Local compatible service / Custom
API Key: your own provider key
Model: for example gpt-4o-mini or deepseek-v4-flash
API URL: an OpenAI-compatible Chat Completions endpoint
Common API URLs:
OpenAI https://api.openai.com/v1/chat/completions
DeepSeek https://api.deepseek.com/chat/completions
DashScope https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions
Local http://localhost:8000/v1/chat/completions
Settings are saved automatically. The project does not include or require any developer-owned API key.
The settings page keeps provider, model, API Key, custom endpoint, Thinking controls, and API testing together in API connection. The custom endpoint field appears only for the Custom provider. Interface language, prompt, concurrency, and maintenance actions live in the collapsed Advanced settings section.
The interface follows the browser language by default and can be changed in Advanced settings, while translation languages remain independent. You can translate English to Simplified Chinese, Japanese to Traditional Chinese, or any other provider-supported direction.
Strongly recommended: keep disable controllable thinking enabled in API connection. Thinking/reasoning mode can make translation much slower. Auto select does not hard-code providers from the URL or model name. Clicking Test API probes the supported control shape and saves the result. Changing the API URL or model requires another test; no extra Thinking field is sent before that test succeeds.
Select Custom and enter your gateway's Chat Completions endpoint, gateway key, and model (for example, workbuddy-opencode-go/deepseek-v4-flash). Direct OpenCode connections use the official endpoint and an unprefixed model name.
The opencode.ai host and model routes whose provider prefix ends in opencode or opencode-go automatically receive x-opencode-session. Paragraphs, scrolling, and reconnections share the current page translation session. Restarting translation or opening another page creates a new session. Each API test has its own session, reused across parameter probes and retries. Legacy batch messages receive one session per batch task.
For DeepSeek Flash, keep disable controllable thinking enabled and select thinking.type: disabled, then test the API. Unchecking the control or omitting the parameter does not actively disable thinking. Reload the extension and target pages after updating the code.
- Start translation: translate visible and nearby readable content.
- Translate current screen: limit scanning to the current viewport area.
- Hide / Show translations: temporarily switch between translated view and original view.
- Clear translations: remove inserted translations from the current page.
- Right-click page: translate the current page.
- Right-click selected text: translate only the selected text.
Page translation first checks the page language. Pages already in the target language are skipped; otherwise DualRead translates readable visible and nearby blocks, including short headings and labels. Selected-text translation remains available for small mixed-language snippets.
Not by default. DualRead focuses on the current viewport and nearby content to reduce API requests and token cost.
Any OpenAI-compatible Chat Completions API can work. Built-in presets cover OpenAI, DeepSeek, DashScope/Qwen, local compatible services, and custom endpoints.
Yes, and it is strongly recommended for translation speed. Keep Strongly recommended: disable controllable thinking enabled, choose Auto select, and click Test API. DualRead tries the next control shape only when the endpoint explicitly rejects a Thinking field; authentication, rate-limit, model, network, and timeout errors stop immediately. A manual strategy remains available in advanced settings.
The API key is stored locally in Chrome extension storage. It is not sent to any project-owned server.
Yes. The interface follows the browser language by default, can be changed in Advanced settings, and remains independent from source and target languages. The extension UI includes Simplified Chinese, Traditional Chinese, English, and Japanese localization.
- API Key, settings, and translation cache are stored locally in Chrome extension storage.
- Webpage text is sent only to the API endpoint configured by the user.
- The extension does not run a project-owned server and does not include analytics.
- Do not paste real API keys into issues, screenshots, or public bug reports.
See PRIVACY.md for details.
npm install
npm run check
npm test
npm run test:layout
npm run test:samples
npm run test:allUseful scripts:
npm run audit:public # scan publishable files for keys, local paths, and unsafe artifacts
node scripts/generate-locales.jsStart with the documentation index. Development notes are in docs/development.md, and manual sample pages are listed in test-pages.md.
Before sharing or publishing:
- Run
npm run check. - Confirm screenshots do not show API keys, accounts, or private pages.
- Confirm
.env,.npmrc, archives, CRX files, and private keys are not committed. - If publishing the Git history, check commit author name/email first.
Chrome extension, AI translator, bilingual webpage translation, webpage translator, OpenAI-compatible translator, DeepSeek translator, Qwen translator, browser extension translation, English to Chinese translator.

