Advanced Subtitle Translator is a powerful, user-friendly desktop application for translating subtitle files with support for multiple formats (SRT, ASS, VTT) and languages. Features a modern GUI, intelligent caching, batch processing, and automatic language detection.
The modern GUI interface showing a translation in progress with all features visible: file selection, language detection, format options, and real-time progress tracking.
- File Selection: Easy browse and auto-generate output file names
- Language Detection: Auto-detect source language with "Auto-detected: en"
- Format Support: SRT input with customizable output format (.srt, .ass, .vtt)
- Translation Options: Google Translate engine with backup and cache options
- Progress Tracking: Real-time progress bar showing "Translating subtitle 255/1887..."
- Action Buttons: Start/Stop translation, Preview, and Open Output Folder
- Drag & Drop Area: Intuitive file handling with visual feedback
- Tabbed Interface: Single File, Batch Process, Settings, and Statistics tabs
- 🖱️ Drag & Drop Interface - Simply drag subtitle files to translate
- 🌍 Auto Language Detection - Smart detection of source language
- 📁 Batch Processing - Translate multiple files simultaneously
- 💾 Intelligent Caching - Reduces API calls and improves speed
- 🎨 Modern GUI - Clean, professional interface with real-time progress
- 📊 Multiple Formats - Support for SRT, ASS, and VTT subtitle formats
- 🔧 Customizable Settings - Flexible configuration options
- 📈 Statistics & Analytics - Track translation performance
# Clone the repository
git clone https://github.com/yourusername/advanced-subtitle-translator.git
cd advanced-subtitle-translator
# Install dependencies
pip install -r requirements.txt
# Run the application
python run_gui.py- Launch the application: Run
python run_gui.py - Load a subtitle file: Drag & drop or use the Browse button
- Select target language: Choose your desired translation language
- Start translation: Click "🚀 Start Translation"
- View results: Translated file is automatically saved
| Format | Read | Write | Features |
|---|---|---|---|
| SRT | ✅ | ✅ | Standard SubRip format |
| ASS | ✅ | ✅ | Advanced SubStation Alpha with styling |
| VTT | ✅ | ✅ | WebVTT for web videos |
Auto-Detection: Automatically detects source language from content
Supported Languages: Arabic, English, French, Spanish, German, Italian, Russian, Japanese, Korean, Chinese, Portuguese, Dutch, Swedish, Turkish
- Google Translate - High quality, fast translation
- Microsoft Translator - Alternative translation service
- Configurable Delays - Respect API rate limits
- Retry Logic - Automatic retry on failures
- SQLite Database - Persistent translation cache
- Duplicate Detection - Avoid re-translating identical text
- Cache Management - View and clear cache statistics
- Performance Boost - 70-90% cache hit rate
- GUI User Guide - Complete GUI documentation
- Command Line Guide - Advanced usage and CLI options
The main interface shows a real translation in progress:
- File: Movie subtitle file (1,887 subtitles)
- Progress: Currently translating subtitle 255/1,887
- Languages: Auto-detected English → Arabic
- Engine: Google Translate with caching enabled
- Format: SRT format with backup creation
- Smart File Handling: Auto-generate output names with customizable suffixes
- Visual Progress: Real-time progress bars and status updates
- Format Flexibility: Support for SRT, ASS, and VTT formats
- Quality Options: Backup creation and intelligent caching
- User Experience: Clean, intuitive interface with drag & drop support
# Add files to batch
app.add_file_to_batch("movie1.srt")
app.add_file_to_batch("movie2.ass")
app.add_directory_to_batch("/path/to/subtitles/")
# Start batch translation
app.start_batch_translation(){
"translation_engine": "google",
"default_source_language": "en",
"default_target_language": "ar",
"cache_enabled": true,
"create_backup": true,
"output_suffix": "_translated"
}# Single file translation
python translate_subtitles.py input.srt --target ar --output output.srt
# Batch translation
python translate_subtitles.py --batch /path/to/files/ --target ar
# With custom engine
python translate_subtitles.py input.srt --engine microsoft --target fr| Metric | Performance |
|---|---|
| Startup Time | < 2 seconds |
| Translation Speed | 1-2 seconds per subtitle |
| Memory Usage | < 50MB |
| Cache Hit Rate | 70-90% |
| Max File Size | 10MB+ |
- Python: 3.7 or higher
- Memory: 512MB RAM minimum
- Storage: 50MB free space
- Network: Internet connection for translation APIs
- OS: Windows, macOS, Linux
- Default source/target languages
- Translation engine selection
- Request delays and retry limits
- Cache management options
- Interface language (English/Arabic)
- Theme and appearance
- Progress display options
- File naming conventions
- Cache size limits
- Concurrent translation limits
- Network timeout settings
- Backup file management
# Run all tests
python test_program.py
# Run GUI tests
python test_gui.py
# Run specific module tests
python -m pytest tests/- Unit tests for all core modules
- GUI interaction testing
- Translation engine testing
- Format handler testing
- Cache system testing
We welcome contributions! Please see our Contributing Guide for details.
# Clone and setup development environment
git clone https://github.com/yourusername/advanced-subtitle-translator.git
cd advanced-subtitle-translator
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install development dependencies
pip install -r requirements-dev.txt
# Run in development mode
python gui_translator.py- Follow PEP 8 guidelines
- Use type hints where applicable
- Write comprehensive docstrings
- Maintain test coverage above 80%
This project is licensed under the MIT License - see the LICENSE file for details.
- Deep-translator library for translation API integration
- Python tkinter community for GUI framework
- SQLite for reliable data storage
- All contributors and beta testers
- ⭐ Star this repository if you find it useful
- 🍴 Fork and create your own improvements
- 📢 Share with friends and colleagues
- 🐛 Report bugs and suggest features
- ✅ Progress Saving & Resume: Automatic progress saving with resume functionality
- ✅ Session Management: Advanced session management with visual interface
- ✅ Auto-Recovery: Recover progress after interruptions or crashes
- Real-time Translation - Live translation preview
- Cloud Sync - Sync settings across devices
- Plugin System - Custom translation engines
- Mobile App - Android/iOS companion app
- AI-powered Translation - Integration with GPT models
- Voice Recognition - Audio-to-subtitle conversion
- Collaborative Translation - Team translation features
- Quality Metrics - Translation quality scoring
Made with ❤️ by the Hamad


