A Chrome extension that adds a convenient translation drawer to any webpage, allowing you to translate text between different languages with ease.
- Floating translation drawer accessible on any webpage
- Translation between multiple languages
- Copy translated text with a single click
- Reverse translation direction with one button
- Keyboard shortcut (Shift+Enter) for quick translation
- Customizable API key through options page
- Clone or download this repository to your local machine
- Open Chrome and navigate to
chrome://extensions/ - Enable "Developer mode" by toggling the switch in the top right corner
- Click on "Load unpacked" and select the downloaded directory
- The extension is now installed and ready to use
- After installation, you'll need to set up your Google Translate API key
- Right-click on the extension icon and select "Options"
- Enter your Google Translate API key and click "Save"
- Follow the instructions in the options page to get an API key if you don't have one
- Click the extension icon in the Chrome toolbar to open the translation drawer
- Select your source and target languages
- Enter or paste the text you want to translate
- Click "Translate" or press Shift+Enter
- The translated text will appear in the output box
- Click "Copy" to copy the translated text to your clipboard
- Click "Reverse" to swap languages and translation direction
- Click "Clear" to reset both text fields
manifest.json: Extension configurationsrc/content.js: Main content script that creates the translation drawersrc/copy-button.js: Script for handling the copy functionalitysrc/drawer-styles.css: Styling for the translation drawersrc/background.js: Background script for extensionsrc/options/: Options page files for API key configuration
- Make your changes to the source files
- Go to
chrome://extensions/and click the refresh icon on the extension - Test your changes by clicking the extension icon
This project is released under the CC0 1.0 Universal (CC0 1.0) Public Domain Dedication. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
See the LICENSE file for more information.