King Translator AI

Dịch văn bản (bôi đen văn bản, khi nhập văn bản), hình ảnh, audio, video bằng Google Gemini API. Hỗ trợ popup phân tích từ vựng, popup dịch và dịch nhanh.

Autor
king1x32
Instalaciones diarias
0
Instalaciones totales
76
Calificaciones
1 0 0
Versión
4.4
Creado
10/03/2025
Actualizado
01/05/2025
Tamaño
350 KB
Licencia
GPL3
Funciona en
Todos los sitios

English | Tiếng Việt

King Translator AI - The All-in-One AI Translation Tool 🔥

Version Status License Discord

King Translator AI Logo
Translate everything with the power of 6 leading AI providers, right in your browser!

If you like this userscript, please give this repository a star! ✨

📖 Table of Contents

🚀 What's New in Version 5.0?

Version 5.0 is a major update focused on expanding capabilities, optimizing performance, and enhancing user experience:

  • 🧠 Multi-AI Provider Support: Integrates 6 leading AI providers: Gemini, Claude, Perplexity, OpenAI, Mistral, and Puter.
    • Gemini: Full support for all features, including large file translation.
    • Claude, Perplexity, OpenAI, Mistral: All features supported except file translation.
    • Puter: Text-related features and YouTube live-caption translation.
  • 🗣️ Versatile Text-to-Speech (TTS): Adds 5 new TTS sources (Gemini, OpenAI, Google Cloud, Google Translate) alongside device TTS, with customizable voice, speed, and pitch.
  • 🚀 API & Performance Optimization: Improved API key management to minimize rate-limiting, resulting in faster and more stable page translations.
  • 🎨 Enhanced Manga Web Translation: More accurate translation placement, with support for moving and resizing translated text bubbles.
  • 🖼️ Upgraded OCR: The "OCR Region" feature has been revamped into a more powerful and convenient "Capture and Translate Screen Region" tool.
  • 🔒 Enhanced Security: Settings backup files are now encrypted to protect your API keys.
  • ✍️ Improved Input Translation: The translation tool for input fields can now be moved and its position saved per website.
  • ⚙️ UI & Experience:
    • A redesigned, more attractive translation popup with a convenient copy button.
    • A global toggle switch to enable or disable all translation tools at once.
  • 📂 Large File Support: Translate local files up to 2GB (supported via Gemini API).
  • Bug Fixes & Stability: Resolves issues reported in previous versions.

🌟 Introduction

King Translator AI is a powerful userscript that transforms your browser into an all-encompassing translation powerhouse. By integrating the most advanced AI models, the script allows you to break down any language barrier, from simple text translation to complex video analysis, all with just a few clicks.

✨ Core Features

🧠 Multi-AI Provider Translation - Flexibly choose from 6 leading AI providers: **Google Gemini, Anthropic Claude, Perplexity, OpenAI, Mistral, and Puter**. - Leverage the strengths of each model for different translation tasks. - Smart API key management with automatic rotation to optimize performance and avoid rate-limits.
📝 Intelligent Text Translation - **Quick Translation:** Instantly translate selected text. - **Popup Translation:** A modern popup interface displaying the original text, phonetic transcription (IPA/Pinyin), and translation. - **Advanced Translation:** Deeper vocabulary and context analysis. - **Input Field Translation:** Automatically translate text within input fields and textareas as you type. - **Full Page Translation:** Translate entire web pages with the option to exclude specific elements. - **YouTube Live-Caption Translation:** Real-time translation of YouTube video subtitles, with bilingual display support.
🖼️ Image (OCR) & Manga Translation - **Capture and Translate Screen Region:** Drag your mouse to select and translate any content on your screen. - **Web Image Translation:** Click on any image on a webpage to translate its embedded text. - **Image File Translation:** Upload an image file from your computer to translate it. - **Specialized Manga Translation:** Automatically detects and translates speech bubbles in comics, allowing you to move and resize the translated text overlays.
🎵 Media & File Translation (Up to 2GB) - **Audio/Video File Translation:** Upload media files (MP3, MP4, WAV, WEBM...) to get transcripts and translations. - **Large File Support (Gemini API):** Translate documents and media files up to 2GB. - **Direct URL Translation (Gemini/Puter):** Paste a file link to translate without downloading. - **Document Translation:** Supports PDF, HTML, SRT, VTT, JSON, MD, and more.
⚙️ Comprehensive Customization - **Custom Prompts:** Full control to modify the prompts sent to the AI for each translation task. - **Interface:** Light/Dark mode, customizable font size, and popup width. - **Display Modes:** Choose between "Translation Only," "Parallel (Bilingual)," and "Language Learning" (Original + Phonetics + Translation). - **Hotkeys & Gestures:** Set up custom keyboard shortcuts and touch gestures for mobile devices. - **Cache Management:** Enable/disable and customize caching to speed up subsequent translations. - **Backup & Restore:** Easily export/import all your settings with an encrypted file.

📸 Screenshots

📱 Mobile Interface
Mobile 1 Mobile 2 Mobile 3 Mobile 4
💻 Desktop Interface
PC 1 PC 2 PC 3 PC 4

🔧 Installation Guide

Step 1: Install a Userscript Manager

You need a userscript manager. Violentmonkey is highly recommended.

Step 2: Install the King Translator AI Script

Important Note: Due to new Greasy Fork policies, version 5.0 cannot be updated on their platform at this time. Please install the latest version directly from GitHub to get all new features and bug fixes.

Install the latest version (v5.0) from GitHub:

GitHub Compressed Version     GitHub Normal Version

Older, outdated version on GreasyFork (no longer updated):

Greasy Fork

Step 3: Get & Configure API Keys

  1. Get API Keys:
    • Gemini (Recommended): Go to Google AI Studio -> Create API Key.
    • For other providers, visit their respective websites to obtain an API key (Claude, OpenAI, Perplexity, Mistral).
  2. Configure the Script:
    • Open the script settings (Hotkey Alt + S or via the Violentmonkey menu).
    • In the API PROVIDER section, select your desired provider.
    • Paste your API key(s) into the corresponding field. Note: For smooth page and live-caption translation, it is recommended to add multiple keys (3-5 keys) to avoid rate limits.
    • Click Save.

📚 Usage Guide

📝 Translating Selected Text 1. Highlight any text with your mouse. 2. A small translation button will appear. 3. **Interact with the button:** - **Single Click:** Popup translation (default). - **Double Click:** Quick translation (displays inline). - **Click and Hold:** Advanced translation (deeper analysis). (These actions are customizable in the settings)
✍️ Input Field Translation - Automatically displays a compact translation tool inside active input fields (chat boxes, comment sections, etc.). - Quickly translate the content you're writing to the target language (via the 🌐 button) or back to the source language (via the 🔄 button). - Use the `Alt + T` hotkey for instant translation. - **(New in v5.0)** The tool's position is now draggable and its location is saved per website.
🖼️ Translating Images & Manga - **Translate Screen Region:** 1. Open the Tools Menu (⚙️ icon in the bottom-right corner) -> `OCR Region Trans`. 2. Drag your mouse to select the area of the screen you want to translate. - **Translate Web Images:** 1. Open the Tools Menu -> `Web Image Trans`. 2. Hover over images; a blue border will highlight the selectable image. 3. Click the image to translate its content. - **Translate Manga:** 1. Open the Tools Menu -> `Manga Web Trans`. 2. Click on a comic/manga panel. 3. The script will automatically detect and translate speech bubbles. You can move or resize the translated overlays.
🎵 Translating YouTube Live-Captions 1. Open a YouTube video that has subtitles. 2. A translation button with the script's logo will appear on the video control bar. 3. Click this button to toggle real-time subtitle translation.
📂 Translating Files - **Standard File Translation (PDF, HTML, SRT...):** 1. Open the Tools Menu -> `File Translate`. 2. Select a file from your computer. 3. The translated file will be downloaded automatically. - **VIP File Translation (Large Files, URLs - Gemini API):** 1. Open the Tools Menu -> `Translate VIP`. 2. Choose to upload a file (up to 2GB supported) or paste a file URL. 3. The result will be displayed in a popup.

⌨️ Hotkeys & Gestures

Action Hotkey (Windows/Linux) Hotkey (macOS) Gesture (Mobile)
Open Settings Alt + S Cmd + S 4-finger tap
Translate Full Page Alt + F Cmd + F -
Quick Translate (selected) Alt + Q Cmd + Q -
Popup Translate (selected) Alt + E Cmd + E 2-finger tap
Advanced Translate (selected) Alt + A Cmd + A 3-finger tap
Translate in Input Field Alt + T Cmd + T -
Toggle Translator Tools - - 5-finger tap

🤝 Support & Contribution

  • Bug Reports & Feature Requests: Please open an Issue on GitHub.
  • Discussion & Support: Join our community Discord Server.
  • Code Contributions: Feel free to fork the project and create a Pull Request. All contributions are welcome!

❤️ Support the Developer

If you find this script useful, please consider supporting my work with a donation. It helps me dedicate more time to development and updates.

📄 License

This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.


Made with ❤️ by King1x32
FacebookTelegram