Skip to content

A Chrome extension to translate any text and tweets to any language (Persian by default) using Gemini AI.

Notifications You must be signed in to change notification settings

Misaghlb/EV-Translator-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EV Translator AI

English

Project Description

This Chrome extension allows Twitter users to translate tweets and text in foreign languages into any language of their choice. It also provides the ability to translate selected text on any website and translate PDF files. The tool uses the Gemini API to provide accurate and customizable translations.

Features

  • Tweet Translation: Click the "Translate" button below tweets to translate them into your selected language.
  • Re-translation: Get a new translation using the "Re-translate" button if you're not satisfied with the initial translation.
  • Selected Text Translation: Select any text on any website and a translate button will appear, allowing you to translate the selected text into your chosen language.
  • PDF Translation: Translate the currently visible page or specific sections of PDF files into your chosen language.
  • Automatic Language Detection: The system automatically detects the language of the text and translates it to your selected language.
  • Custom Translation Prompt: Users can enter their own prompt for translation to adjust the model and tone according to their needs.

Installation

  1. Download the extension from this page.
  2. Place the downloaded file in a folder.
  3. In Chrome, go to the extensions page (Menu > Extension > Manage Extensions).
  4. Select "Load Unpacked" from the left menu and choose the extension folder.
  5. Go to https://aistudio.google.com/app/apikey to get a free Gemini API Key from Google.
  6. Go to the extension settings and enter your API Key.
  7. In the "Translation Prompt" section, enter your desired prompt or use the default one.

Usage

  • Tweet Translation: After installing the extension, go to Twitter. Below each non-Persian tweet, the "Translate" button will appear. Click this button to translate the tweet into your selected language. If you are not satisfied with the translation, you can click the "Re-translate button to get a new translation.
  • Selected Text Translation: On any website, select the text you want. The "Translate" button will appear near the selected text. Click this button to translate the selected text into your chosen language.
  • PDF Translation: When viewing a PDF file, the "Translate PDF" button will appear at the top corner of the page. Click it to select the currently visible page or a specific area for translation and set your target language.

Changing Output Language

One of the key features of this extension is the ability to select the output language for translations. You can directly choose your target language via the extension settings and translate texts into any language you wish.

Contribution

If you are interested in improving this project, you can contribute via Pull Request or Issue.


فارسی

توضیحات پروژه

این اکستنشن برای مرورگر کروم طراحی شده است که به کاربران توییتر اجازه می‌دهد توییت‌ها و متون به زبان‌های خارجی را به هر زبان دلخواهی ترجمه کنند. همچنین امکان ترجمه متن انتخاب شده در هر وب‌سایتی و ترجمه فایل‌های PDF را فراهم می‌کند. این ابزار با استفاده از API جمینای (Gemini) کار می‌کند و امکان ترجمه دقیق و سفارشی را فراهم می‌کند.

ویژگی‌ها

  • ترجمه توییت‌ها: با کلیک بر روی دکمه "Translate" زیر توییت‌های غیرفارسی، متن توییت به زبان انتخابی شما ترجمه می‌شود.
  • بازترجمه: امکان دریافت ترجمه جدید با استفاده از دکمه "Re-translate" در صورت نارضایتی از ترجمه اولیه.
  • ترجمه متن انتخابی: با انتخاب هر متنی در هر وب‌سایت، دکمه ترجمه ظاهر می‌شود که با کلیک روی آن، متن انتخاب شده به زبان انتخابی شما ترجمه می‌شود.
  • ترجمه فایل‌های PDF: امکان ترجمه صفحه در حال نمایش یا بخش خاصی از فایل‌های PDF به زبان انتخابی شما.
  • تشخیص خودکار زبان: سیستم به صورت خودکار زبان متن را تشخیص داده و آن را به زبان انتخابی شما ترجمه می‌کند.
  • دستور ترجمه سفارشی: کاربران می‌توانند پرامپت مورد نظر خود را برای ترجمه وارد کنند تا مدل و لحن ترجمه مطابق با نیاز آن‌ها باشد.

نحوه نصب

  1. اکستنشن را از این صفحه دانلود کنید.
  2. فایل دانلود شده را در یک فولدر قرار دهید.
  3. در مرورگر کروم وارد صفحه اکستنشن ها شوید (از آدرس Menu > Extension > Manage Extensions)
  4. در صفحه باز شده گزینه Load Unpacked را از منوی سمت چپ انتخاب و فولدر اکستنشن را انتخاب کنید.
  5. به آدرس https://aistudio.google.com/app/apikey بروید و یک API Key رایگان از جمینای گوگل دریافت کنید.
  6. به بخش تنظیمات اکستنشن بروید و API Key خود را در این بخش وارد کنید.
  7. در بخش "Translation Prompt"، پرامپت مورد نظر خود را وارد کنید یا از پرامپت پیش‌فرض استفاده نمایید.

نحوه استفاده

  • ترجمه توییت‌ها: پس از نصب اکستنشن، به توییتر بروید. زیر هر توییت غیرفارسی، دکمه "Translate" ظاهر می‌شود. با کلیک بر روی این دکمه، متن توییت به زبان انتخابی شما ترجمه می‌شود. اگر از ترجمه راضی نیستید، می‌توانید روی دکمه "Re-translate" کلیک کنید تا ترجمه جدیدی دریافت کنید.
  • ترجمه متن انتخابی: در هر وب‌سایتی، متن مورد نظر خود را انتخاب کنید. دکمه "Translate" در نزدیکی متن انتخاب شده ظاهر می‌شود. با کلیک بر روی این دکمه، متن انتخاب شده به زبان انتخابی شما ترجمه می‌شود.
  • ترجمه PDF: هنگام مشاهده فایل PDF، دکمه "Translate PDF" در گوشه بالای صفحه ظاهر می‌شود. با کلیک روی آن می‌توانید صفحه در حال نمایش یا ناحیه خاصی از آن را برای ترجمه انتخاب کنید و زبان مقصد را تعیین نمایید.

تغییر زبان خروجی

یکی از قابلیت‌های مهم این افزونه، امکان انتخاب زبان خروجی ترجمه است. شما می‌توانید زبان مقصد را مستقیماً از طریق تنظیمات افزونه انتخاب کنید و متون را به هر زبان دلخواهی ترجمه نمایید.

مشارکت

اگر به بهبود این پروژه علاقه‌مند هستید، می‌توانید از طریق Pull Request یا Issue مشارکت کنید.

About

A Chrome extension to translate any text and tweets to any language (Persian by default) using Gemini AI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published