This app runs inside the BotSurf browser. Don't have it yet? Get the app or extension now!

Selected Text Translator Popup

Utilities · All
0 installs · Verified BotGentz app
Launch App
Opens in BotSurf — try it free, no account needed.
CategoryUtilities
PlatformAll
Pricing Free
Installs0
Download BotSurf to use — free
No account needed for free apps. Once BotSurf is open, find this app in Apps from the + menu.

About this app

WHAT IT DOES

Selected Text Translator Popup instantly translates any text you select on a webpage. Highlight text in any language, and a popup appears with the translation in your preferred language. The extension uses free translation APIs (Google Translate or LibreTranslate) with automatic language detection, so you don't need to specify the source language. You can copy the translation to your clipboard or replace the original text with the translation. A detailed panel shows the original text alongside the translation, with options to copy or replace. Translations are cached locally to reduce API calls and speed up repeated translations. The extension supports over 20 languages including English, Spanish, French, German, Chinese, Japanese, Arabic, and more.

WHERE IT RUNS

The extension works on every website with selectable text, including news sites, blogs, documentation pages, social media, and any other page with text content. It runs locally in your browser, sending selected text to the translation API and displaying results without storing or transmitting any data beyond the translation request. The extension supports all major browsers and adapts to both desktop and mobile viewports seamlessly.

HOW TO USE

After installation, select any text on a webpage. If auto-translate is enabled, the translation appears instantly in a tooltip. If auto-translate is off, a "Translate" button appears—click it to translate. The tooltip shows the translated text with options to copy the translation or open the detailed panel. The panel displays the original text and translation side by side, with Copy and Replace buttons. To customize the experience, open the extension panel and set your default target language. Choose your preferred API (Google Translate, LibreTranslate, or a custom endpoint). Toggle "Auto-translate on selection" to enable or disable automatic translation. Toggle "Show tooltip on selection" to show or hide the tooltip. Toggle "Cache translations" to store results locally and set the cache duration. For per-site customization, enable or disable the extension on specific websites using the per-site controls.

THE ACTUAL MECHANISM — SELECTION API WITH TRANSLATION PIPELINE AND LOCAL CACHING

The extension uses the browser's Selection API to detect user text selection. When a selection is detected, the extension extracts the text and performs automatic language detection using character range heuristics (Cyrillic, CJK, Arabic, accented Latin, etc.). The translation request is sent to the selected API endpoint using GM_xmlhttpRequest. For Google Translate, it uses the unofficial translate.googleapis.com endpoint with a GET request. For LibreTranslate, it uses the public libreTranslate.com API with a POST request and JSON body. For custom endpoints, the extension sends a POST request with a JSON payload containing the text, source language, and target language. The response is parsed to extract the translated text. All successful translations are cached in GM_setValue with a timestamp and expiration based on the user's cache duration setting. The cache key is derived from the text and target language. The tooltip is positioned relative to the selection using the range's bounding client rect, with position adjustments for viewport boundaries. The panel shows the translation with source language detection, target language, and cache status.

THE PANEL

The settings panel is a lightweight, draggable overlay that appears in the center of your screen. You can reposition it by clicking and dragging the title bar; release it near the screen edge and it will snap into place automatically. To collapse the panel into a compact title bar, click the minimize button, expanding it again with the same control. The panel is fully responsive, adapting to different screen resolutions with a minimum width of 300px and a maximum of 480px. Press the Escape key at any time to dismiss the panel without applying changes. All controls—the enable/disable toggle, translate selected button, target language selector, API selector, custom endpoint input, tooltip toggle, auto-translate toggle, cache toggle, cache duration input, and per-site controls—are accessible within a clean, high-contrast interface that respects your system's color scheme.

PLEASE NOTE

This extension requires the free BotGentz companion extension to be installed and active, which provides the underlying DOM access, clipboard, and HTTP request capabilities. The translation APIs are free and publicly accessible, but may have rate limits or change availability over time. Google Translate uses an unofficial API endpoint that may break or be blocked. LibreTranslate is a free and open-source translation service that may also have rate limits. The extension does not collect, store, or transmit any personal data or browsing history—only the selected text is sent to the translation API. All caching is local using GM_setValue. No analytics, trackers, or ads are included. The extension respects your privacy and does not share any information with third parties beyond the translation API request.

Similar Apps

Log in to BotGentz

Suggest an App

Tell us what you'd find useful — if we build it, we'll email you the moment it's ready.