Open-source file translation UI powered by AI
Live Demo β’ Features β’ Installation β’ n8n Integration β’ License
File Translator is a modern, open-source web application that allows you to translate text files line-by-line or as a whole using AI-powered translation. It features a beautiful, responsive UI with dark/light theme support and integrates seamlessly with n8n workflows.
π Live Demo: https://webisso.github.io/file-translator/
- π File Upload - Drag & drop or click to upload any text file
- π Multi-language Support - Translate between 30+ languages
- π Two Translation Modes
- Per-line: Translates each line individually with real-time progress
- Whole-file: Sends entire content at once for faster processing
- β‘ Real-time Translation - Watch translations appear line by line
- π Diff View - Git-style diff visualization (red/green) to compare original and translated content
- π¨ Dark/Light Theme - System-aware theme with manual toggle
- π Copy & Download - Export translated content easily
- π Stop Translation - Cancel ongoing translations anytime
- π n8n Integration - Connect to your own n8n workflow for AI translation
| Dark Theme | Light Theme |
|---|---|
| Upload and translate files with a modern dark interface | Full light theme support for any environment |
- Node.js 18+
- npm or yarn
- n8n instance (for translation backend)
# Clone the repository
git clone https://github.com/webisso/file-translator.git
# Navigate to project directory
cd file-translator
# Install dependencies
npm install
# Start development server
npm startThe app will be available at http://localhost:3000
npm run buildThis creates an optimized production build in the build folder.
- Configure n8n URL: Click "Settings" and enter your n8n webhook URL
- Upload a File: Drag & drop or click to select a text file
- Select Languages: Choose base language (source) and target language
- Choose Mode: Select "Per-line" for real-time progress or "Whole-file" for batch translation
- Translate: Click "Translate file" and watch the magic happen
- Review: Switch between Original, Translated, and Diff views
- Export: Copy to clipboard or download the translated file
File Translator requires an n8n workflow to handle the actual translation. Here's how to set it up:
Webhook β AI Agent β Code β Respond to Webhook
Create a Webhook node with the following settings:
| Setting | Value |
|---|---|
| HTTP Method | POST |
| Authentication | None |
| Respond | Using 'Respond to Webhook' Node |
Connect an AI Agent node (GPT-4, Claude, etc.) with:
Prompt:
The current language of the sentence to be translated: {{ $json.body['baseLanguage'] }}
The sentence to be translated: {{ $json.body.lineText }}
The target language: {{ $json.body['targetLanguage'] }}
System Message:
You are a translator. You will translate the given sentence into the specified language. In your response, write only the translation. Do not write anything else. Do not write any HTML tags, only the translation. Never use tags such as \n.
Add a Code node to format the response:
const translatedText = $input.first().json.output;
return [
{
json: {
translatedText: translatedText,
meta: {
model: "gpt-4.1",
latencyMs: 420
}
}
}
];Note: The
metafield is optional and can contain any metadata you want to track.
Add a "Respond to Webhook" node with:
| Setting | Value |
|---|---|
| Respond With | First Incoming Item |
POST /webhook/file-translator
Content-Type: application/json
{
"mode": "per-line",
"fileName": "example.txt",
"lineIndex": 0,
"lineText": "Hello world",
"baseLanguage": "en-US",
"targetLanguage": "tr",
"metadata": {
"totalLines": 120,
"path": "src/messages/en.json"
}
}{
"translatedText": "Merhaba dΓΌnya",
"meta": {
"model": "gpt-4.1",
"latencyMs": 420
}
}POST /webhook/file-translator
Content-Type: application/json
{
"mode": "whole-file",
"fileName": "example.txt",
"content": "Full file content as a single string",
"baseLanguage": "en-US",
"targetLanguage": "tr"
}{
"translatedContent": "TamamΔ± Γ§evrilmiΕ dosya iΓ§eriΔi",
"meta": {
"model": "gpt-4.1",
"segments": 12
}
}- React 19 - UI framework
- React Router DOM 7 - Client-side routing
- CSS Custom Properties - Theming system
- Fetch API - HTTP requests with AbortController support
file-translator/
βββ public/
β βββ index.html
β βββ manifest.json
β βββ robots.txt
βββ src/
β βββ App.js # Main application component
β βββ App.css # All styles
β βββ index.js # Entry point
β βββ ...
βββ package.json
βββ LICENSE
βββ README.md
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Create React App
- Powered by n8n for workflow automation
- Inspired by modern translation tools
GitHub β’ License β’ Webisso Website β’ Contact Us
Made with β€οΈ by Webisso