Skip to content

aliksumin/Translator

Repository files navigation

AI Document Translator

The AI Document Translator is a powerful Next.js application that leverages the Google Gemini Engine to accurately translate .docx, .pdf, .dwg, and image files structurally, preserving 100% of native layouts and boundaries.

Installation

We have provided a convenient .bat file to automate setting up the application. Alternatively, you can install the dependencies manually.

Automated Setup

  1. Double-click install.bat on your machine.
  2. Wait for it to finish installing both Node.js packages and the required Python tools automatically.

Manual Setup

If you prefer setting it up manually from a terminal:

# 1. Install Node.js dependencies
npm install

# 2. Install Python dependencies 
python -m pip install pywin32 pdf2docx

Launching the Application

Automated Launch

Double-click the run.bat script anytime you want to start the AI Document Translator server. A background terminal will open. Once ready, visit http://localhost:3000 in your browser.

Manual Launch

npm run dev

Configuration & API Keys

Before using the application, you must configure it with a valid Google Gemini API Key. The AI Document Translator utilizes Google's advanced language models to accurately translate native documents and images.

Obtaining an API Key

  1. Navigate to Google AI Studio.
  2. Sign in with your Google account.
  3. Click on the Create API key button and copy the generated key string.

Warning

Privacy Guarantee: Your API key is stored exclusively in your browser's local storage. It is never saved to a database, tracked, or sent to any server other than your local machine passing it directly to the official Google Gemini endpoints.

Application Settings

Access the Settings menu by clicking the Settings button in the top right corner of the application interface.

  • API Key: Paste your generated key here.
  • Model: Select between different Gemini models (e.g., Gemini 3.1 Pro for the highest quality structure retention, or Flash for cost-effective speed).
  • Auto-Save to Output Folder: Check this box to instantly route your processed documents directly to the local Output/ folder inside the app directory, entirely overriding standard browser download prompts for a smoother workflow.

Supported File Types & Requirements

.docx (Microsoft Word)

  • Translated natively strictly preserving Word XML bounds, tables, formatting, margins, and graphics.
  • Fast parallel translation.

.pdf (Portable Document Format)

  • Internally converts vector bounds to editable DOCX, translates, and returns an editable Document natively.

.png, .jpg, .webp (Images / Schematics)

  • Recreates textual data into raw HTML boundaries, tables, or plaintext extraction seamlessly leveraging Google Gemini Vision models.

.dwg (AutoCAD Drawing)

  • [!IMPORTANT] AutoCAD is required: Processing and translating .dwg files relies entirely on an active local installation of AutoCAD on the host machine. The python backend connects securely to AutoCAD through the COM interface (pywin32) to perfectly retain layout logic, block attributes, model space, paper space boundaries, and layer names.

    The translation will happen invisibly in the background. If AutoCAD is closed, the server will launch it automatically.


This project is built using Next.js, running locally to ensure privacy and fast local processing limits.

About

App for translation documents like PDF or DOCS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors