A Chrome extension for automatic page translation with a focus on Korean websites that don't properly set language attributes (preventing Chrome's built-in translator from working).
- One-Click Translation: Click the extension icon and translate any page instantly
- Auto-Translate by Domain: Configure domains (like
.kr) to translate automatically on page load - Visual Status Indicators: Icon changes color to show translation state
- Gray: Neutral/English page
- Red: Foreign language detected, needs translation
- Green: Page has been translated
- Dynamic Content Support: Automatically translates new content as it appears (chat messages, live updates, etc.)
- Smart Batching: Translates efficiently by batching requests and deduplicating repeated text
- In-Memory Cache: Previously translated text is instant on repeat encounters
- Download or clone this repository
- Open Chrome and navigate to
chrome://extensions/ - Enable "Developer mode" (toggle in top right)
- Click "Load unpacked" and select the extension folder
- The translator icon will appear in your toolbar
- Navigate to any webpage
- Click the extension icon in your toolbar
- Select source and target languages (defaults: Korean → English)
- Click "Translate Page"
- Click the extension icon
- Check "Auto-translate on these domains"
- Enter domain patterns (comma-separated):
.kr- matches all Korean domainssooplive.co.kr- matches specific site and subdomainsexample.com- exact domain match
- Click "Save Settings"
This version includes major performance improvements:
| Optimization | Impact |
|---|---|
| Batch Translation | Reduces network requests by 20-50x using glue-string batching |
| Deduplication | Translates each unique string only once, even if it appears 100+ times |
| In-Memory Cache | Instant translation for previously seen text |
| Concurrent Requests | 4 parallel batch requests with automatic rate-limit handling |
| Language Heuristics | Skips pure ASCII/numbers/punctuation (no wasted API calls) |
| MutationObserver | Automatically catches and translates dynamic content |
- Collect all text nodes from the page
- Skip nodes that don't need translation (English, numbers, already processed)
- Deduplicate: group nodes by their text content
- Check in-memory cache for previously translated strings
- Batch remaining texts into groups (max 40 items or 4000 chars per batch)
- Send batches concurrently (max 4 at a time) with retry/backoff
- Update cache with results
- Apply translations to all nodes
- Start MutationObserver to catch dynamic content
Currently uses:
- Primary: Google Translate (unofficial
translate.googleapis.comendpoint) - Fallback: MyMemory Translation API
The backend is abstracted for future support of:
- Google Cloud Translation API (with user API key)
- DeepL API
- Local translation servers (LibreTranslate, Opus-MT)
Located at the top of content.js:
const CONFIG = {
BATCH_MAX_CHARS: 4000, // Max characters per batch request
BATCH_MAX_ITEMS: 40, // Max items per batch
CONCURRENT_REQUESTS: 4, // Parallel request limit
MUTATION_DEBOUNCE_MS: 300, // Debounce time for dynamic content
RETRY_ATTEMPTS: 3,
RETRY_BASE_DELAY_MS: 250,
};gTranslate/
├── manifest.json # Extension configuration
├── background.js # Service worker (auto-translate trigger, icon management)
├── content.js # Main translation logic (runs on web pages)
├── popup.html # Extension popup UI
├── popup.css # Popup styling
├── popup.js # Popup interaction logic
├── icons/ # Extension icons (gray/red/green states)
└── README.md # This file
- Korean (ko) - Primary target
- Japanese (ja)
- Chinese Simplified (zh-CN)
- Chinese Traditional (zh-TW)
- Spanish (es)
- French (fr)
- German (de)
- Russian (ru)
- Auto-detect (auto)
Target languages:
- English (en) - Default
- All source languages also available as targets
- Unofficial API: The Google Translate endpoint used is unofficial and may have rate limits or occasional failures. The extension handles this with retry logic and MyMemory fallback.
- iframes: Content inside iframes is not currently translated (can be enabled in manifest.json with
all_frames: true) - Shadow DOM: Web components using Shadow DOM are not translated
- Check your network connection
- The first translation builds the cache; subsequent translations will be faster
- Very large pages (10,000+ text nodes) will take longer
- Text inside iframes won't be translated
- Pure English/ASCII text is intentionally skipped
- Some dynamically loaded content may take a moment to be caught by MutationObserver
- May indicate rate limiting - wait a few seconds and try again
- Check the browser console (F12) for detailed error messages
The extension logs detailed information to the browser console:
[Translator]- Content script messages[Translator BG]- Background script messages
- Open the page you want to translate
- Open DevTools (F12)
- Check Console for translation logs
- Look for stats like:
[Translator] Found 1500 text nodes [Translator] 200 unique texts (800 skipped) [Translator] Cache: 50 hits, 150 misses [Translator] Created 4 batches [Translator] Done: 700 nodes translated in 2340ms
AGPL-3.0