Skip to content

Chrome/Firefox extension for translating(Read/Write/Listen) from Any Languages to Any Languages using API of Google Gemini , OpenAi , OpenRouter and WebAi.

Notifications You must be signed in to change notification settings

iSegaro/AIWritingCompanion

Repository files navigation

AI Writing Companion

Smart Translation Assistant

Chrome  Chrome  Edge  Edge  Firefox  Firefox 




English | • فارسی

This is a lightweight and efficient personal tool for translating text on websites and even the text you write yourself. With multiple methods for translation and word lookup, it offers a fast and seamless experience:

  • Text Selection Translation: Simply select any text, and the translation box will appear right where you selected.

    Popup showing translation of selected text

  • Element Selection Translation: Activate “Select Element” mode from the extension icon. Then click on any part of the page (e.g., paragraph or button) to translate it entirely, without breaking the page layout.

Webpage after element-selection mode has highlighted an element Webpage before element-selection mode is activated Webpage after element-selection mode has highlighted an element

  • In-Field Translation: When typing inside a form or text field, press the Ctrl + / shortcut or click the inline translator icon to instantly translate the content before sending.

Small translation icon next to text input field

  • Advanced Popup Translation: Clicking the extension icon opens a popup with extended features such as multi-accent pronunciation and dictionary support.

Extension popup interface with translation and dictionary features

This extension is developed solely for personal use and keeps smart and fast translation always within reach.

Smart and fast translation, anytime, anywhere.


✨ Key Features

💸 Free & Open Source:
Always free, powered by open-source code.

🔊 Word and Sentence Pronunciation:
Each translation comes with audio playback for accurate pronunciation. You can also choose from different accents. Click the extension icon to access advanced pronunciation options.

📙 Dictionary Mode:
When selecting a word, you’ll not only get a translation but also helpful information like definitions, synonyms, word type, and usage examples.

Supports Multiple Translation Providers:
You can choose from several AI-powered translation providers:


📋 Requirements

  • A modern Chromium-based browser or Firefox (Chrome, Edge, Brave, etc.)
  • A valid API key (unless using WebAI to API)


🔧 Installation

We're almost done with final touches, and the extension will soon be published on the Chrome Web Store and Firefox Add-ons.

Install for Chrome

  • Download the latest Chrome version here.
  • Extract the downloaded ZIP file.
  • Open chrome://extensions/ and enable Developer mode.
  • Drag the extracted folder into the page to install the extension.
  • Done!

Note: After installation, click the extension icon, go to Settings, and enter your API Key.


Install for Firefox

  • Download the latest Firefox version here.
  • Extract the downloaded ZIP file.
  • Open about:debugging#/runtime/this-firefox/.
  • Click Load Temporary Add-on... and select the manifest.json file from the extracted folder.
  • Done!

Note: After installation, click the extension icon, go to Settings, and enter your API Key.


Install for Microsoft Edge

  • Download the latest Edge version here.
  • Extract the downloaded ZIP file.
  • Open edge://extensions/ and enable Developer mode.
  • Drag the extracted folder into the page to install the extension.
  • Done!

Note: After installation, click the extension icon, go to Settings, and enter your API Key.



🔑 API Keys

To use the extension, you’ll need an API key from one of the providers below:

Provider How to Get API Key Cost
Google Gemini Google AI Studio Free
OpenAI OpenAI API Keys Paid
OpenRouter OpenRouter API Keys Free
WebAI to API (No key needed) Free

Note: WebAI to API is a local Python-based server that allows you to use AI translation without an API key.

Important: If you're in Iran, you may need a VPN to access and register for free API keys.



⚙️ Advanced Settings

In the API Settings page of the extension, each provider has customizable options to let you choose and configure different models:

  • Google Gemini

    You can change the API URL to use different Gemini models. For available models and usage info, see Gemini official documentation. Choosing the right model may improve translation quality, speed, or reduce API cost.

  • OpenAI

    You can select models like gpt-4, gpt-3.5-turbo, and more by entering their names in the settings. Visit OpenAI docs for the full list. This allows you to customize translation quality vs. cost.

  • OpenRouter

    Similar to OpenAI, OpenRouter supports a variety of models. You can pick one from the list at OpenRouter documentation and use it by name.

  • WebAI to API

    This is a free local backend for translation. You can configure your own model in the settings. For setup, see WebAI to API GitHub repo.

These options let you balance between cost, quality, and speed.
The extension uses default models with minimum setup required — but upgrading the model will improve translation results.

Default models used:

  • For OpenAI and OpenRouter: gpt-3.5-turbo
  • For Google Gemini and WebAI to API: gemini-2.0-flash

☕ Buy Me a Coffee

If this project helped you and you’d like to support it, you can buy me a coffee ☕


Donation Method 🔗 Link
BuyMeACoffee Buy Me A Coffee
USDT (Ethereum) 0x76DAF7D7C3f7af9B90e16B5C25d063ff3A1A0f8f
Bitcoin (BTC) bc1qgxj96s6nks6nyhzlncw65nnuf7pyngyyxmfrsw
PayPal کمک مالی PayPal

Thank you for your support!

👥 Contributors

  • iSegar0 iSegar0 X
  • Mohammad Mohammad X


🥤 Development

Prerequisites

Make sure Node.js is installed (it includes npm). Then run:

Note: I am using pnpm in this project instead npm.

cd AI-Writing-Companion
npm install

Build

To generate the extension files, run:

npm run build

npm run build:chrome
npm run build:firefox
npm run build:edge

This will create zip files in the Build-Extension/ directory for each browser, intended for manual installation.

To actively develop and apply changes in real time, use one of follwing commands:

npm run watch

npm run watch:chrome
npm run watch:firefox


🤝 Contributing

  • Star the repo to support the project.
  • 🐞 Report issues via GitHub Issues.
  • 📝 Submit a Pull Request (PR) to help improve the extension.

🖼️ Icons Credit

Icons used in this project are provided by Flaticon and created by:



📜 License

This project is licensed under the MIT License — feel free to modify and share!

About

Chrome/Firefox extension for translating(Read/Write/Listen) from Any Languages to Any Languages using API of Google Gemini , OpenAi , OpenRouter and WebAi.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published