Universal Translator for Discord and the Entire Web
A powerful browser extension that provides seamless, real-time translation for Discord chats and any website. Translate selected text instantly or enable auto-translation for specific domains.
๐บ๐ธ English | ๐จ๐ณ ็ฎไฝไธญๆ
| Feature | Description |
|---|---|
| ๐ Discord Live Translation | Automatically translates Discord chat messages in real-time as they appear |
| ๐ฏ Global Selection Popup | Select any text on any website and get instant translation with a single click |
| โก Auto-Translate Domains | Automatically translate entire pages for specific websites (e.g., Twitter/X) |
| ๐ Multi-Language Support | Translate to/from 8 languages: Chinese, English, Japanese, Korean, Spanish, French, German, Russian |
| ๐ Smart Caching | Translation results are cached to improve performance and reduce API calls |
| ๐ Privacy First | Uses Google's public translation API directly from your browser - no data sent to third parties |
| ๐ฑ Lightweight | Minimal resource usage with optimized MutationObserver for dynamic content |
Search "Global Translator Pro" on Chrome Web Store and install directly.
-
Download or clone this repository:
git clone https://github.com/wearescientist/Global-Translator-Pro.git
-
Open Chrome and navigate to
chrome://extensions/ -
Enable Developer mode (toggle in top right)
-
Click Load unpacked and select the
Global-Translator-Profolder -
The extension icon will appear in your browser toolbar
- Click the extension icon (๐) in your browser toolbar
- Select your Target Language from the dropdown
- Toggle features on/off as needed:
- โ Discord Live Chat - Enable real-time Discord translation
- โ Global Selection Popup - Enable text selection translation
- ๐ Auto-Translate this site - Enable auto-translation for current domain
- Click Save Settings
- Select any text on any webpage
- A ๐ icon appears near your selection
- Click the icon to see the translation instantly
- Simply navigate to Discord - translations appear automatically below foreign messages
- Visual indicator "๐ข Translator Active" appears when active
- Enable "Auto-Translate this site" for your frequently visited foreign websites
- Pages will be translated automatically as you scroll
- Perfect for Twitter/X, news sites, and blogs
| Language | Code |
|---|---|
| ๐จ๐ณ Chinese (Simplified) | zh |
| ๐บ๐ธ English | en |
| ๐ฏ๐ต Japanese | ja |
| ๐ฐ๐ท Korean | ko |
| ๐ช๐ธ Spanish | es |
| ๐ซ๐ท French | fr |
| ๐ฉ๐ช German | de |
| ๐ท๐บ Russian | ru |
Global-Translator-Pro/
โโโ manifest.json # Extension manifest (v3)
โโโ background/
โ โโโ service_worker.js # Background service worker
โโโ popup/
โ โโโ index.html # Settings popup UI
โ โโโ style.css # Popup styles
โ โโโ script.js # Popup logic
โโโ scripts/
โ โโโ global.js # Global webpage content script
โ โโโ discord.js # Discord-specific content script
โโโ utils/
โ โโโ translator.js # Core translation engine
โโโ assets/
โ โโโ icon16.png # Extension icons
โ โโโ icon32.png
โ โโโ icon48.png
โ โโโ icon128.png
โโโ resize_icons.py # Icon generation helper
โโโ README.md
- Manifest V3: Latest Chrome extension format
- Content Scripts: Injected into web pages for DOM manipulation
- Service Worker: Handles translation API calls and context menus
- Chrome Storage API: Persists user settings
- Uses
https://translate.googleapis.com/translate_a/singleendpoint - Free, rate-limited Google Translate API
- Supports automatic language detection (
sl=auto) - Client identifier:
gtx
- Translation Queue: Concurrent requests limited to 4 for optimal performance
- MutationObserver: Efficient DOM change detection
- Result Caching: Prevents duplicate translations
- Same-Language Detection: Skips translation when source equals target
- Chrome 88+ or Chromium-based browser
- Basic knowledge of JavaScript and Chrome Extension APIs
- Clone the repository
- Make your changes to the source files
- Go to
chrome://extensions/and reload the extension - Test your changes
Use the included Python script to generate icon sizes:
python resize_icons.py --source icon_original.pngThe extension requires the following permissions:
| Permission | Purpose |
|---|---|
storage |
Save user preferences |
activeTab |
Access current tab for translation |
scripting |
Inject translation scripts |
contextMenus |
Add "Translate Full Page" context menu |
<all_urls> |
Translate content on any website |
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Translation powered by Google Translate
- Icons designed for Chrome Extension standards
- GitHub: @wearescientist
- Project Link: https://github.com/wearescientist/Global-Translator-Pro
Built with โค๏ธ for breaking down language barriers