ChatGPTranslate is a Chrome extension that allows users to highlight text on any webpage, click an icon to translate the text using OpenAI, and get an explanation of the translated text. It provides a seamless way to understand and interpret foreign language content directly from your browser.
![Screenshot 2024-06-15 at 6 56 51 PM](https://private-user-images.githubusercontent.com/43911794/340052820-3460eb63-5bba-4755-ab8d-471d5075d870.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM3MjgxNjMsIm5iZiI6MTcyMzcyNzg2MywicGF0aCI6Ii80MzkxMTc5NC8zNDAwNTI4MjAtMzQ2MGViNjMtNWJiYS00NzU1LWFiOGQtNDcxZDUwNzVkODcwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE1VDEzMTc0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNjZmE3ZGQ0YWQ3ZTRjMGE0MTQzZjk4NGNiMjVkOTIxYWU2NDkwMTMxZTY5MmNhMzgyMzJjMzYyZmMwZjc1MWUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.pTVD0gJa80m1-TAdEIsa7JMErPbP0IJgy82KO4Q830k)
- Highlight text and click an icon to translate it.
- Get an explanation of the translated text.
- Hear the pronunciation of the text.
- Optionally receive a word-by-word breakdown of the text.
- Dynamically loads a popup with translation, explanation, and breakdown.
- Settings page for entering and saving OpenAI API Key.
- Toggle settings to always display explanations or show them via links.
Clone this repository to your local machine using:
git clone https://github.com/johnlewissims/ChatGPTranslate.git
Navigate to the project directory and install the necessary dependencies using:
cd ChatGPTranslate
npm install
Build the project to generate the dist folder:
npm run build
- Open Chrome and go to chrome://extensions/.
- Enable "Developer mode" by toggling the switch in the top right corner.
- Click the "Load unpacked" button and select the directory where you cloned the repository.
- Click on the extension icon in the Chrome toolbar.
- If you haven't set an API key, you'll see an instruction message.
- Click the link to go to the settings page.
- Enter your OpenAI API Key and save it. You can obtain your API key from the OpenAI API Keys page.