This Chrome extension adds a context menu item that allows users to translate selected text using translate.wordpress.org
. The user can set their preferred language code via an options page.
- Adds a context menu item for translating selected text.
- Opens a new tab with the translation URL including the selected text.
- Allows users to set their preferred language code in the options page.
- Google Chrome browser
-
Clone the Repository
git clone https://github.com/yourusername/translate-extension.git cd translate-extension
-
Load the Extension in Chrome
- Open Chrome and go to
chrome://extensions/
. - Enable "Developer mode" by toggling the switch in the top right corner.
- Click on "Load unpacked" and select the directory where you cloned the repository (
translate-extension
).
- Open Chrome and go to
-
Set Your Preferred Language
- Open the extension options by clicking on the extension icon and selecting "Options" or by going to
chrome://extensions/
and clicking "Details" -> "Extension options". - Enter your preferred language code and click "Save".
- Open the extension options by clicking on the extension icon and selecting "Options" or by going to
- Go to any webpage.
- Select some text.
- Right-click and choose "Translate on wp.org".
- A new tab will open with the translation URL, including the selected text and your preferred language code.
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.
Feel free to submit issues or pull requests if you have any suggestions or improvements.
- Thanks to the Chrome Extensions documentation and community for guidance.