π Modern XML Localization Tool with AI-Powered Batch Translation
A powerful, modern WPF application for translating XML localization files using Google Gemini AI. Features intelligent batch processing, real-time rate limiting, and a beautiful Material Design-inspired interface.
- Google Gemini Integration: Support for all Gemini models (2.5 Flash, 3.0 Pro, etc.)
- Batch Translation: Translate multiple entries in single API calls (90%+ cost reduction)
- Smart Token Management: Automatic batching based on model token limits
- Single Best Translation: AI provides one optimal translation instead of multiple options
- Gaming Context Aware: Optimized for game localization terminology
- Material Design: Beautiful, modern interface with smooth animations
- Real-time Progress: Live progress tracking with pause/resume/stop controls
- Activity Log: Terminal-style activity log with timestamps
- Responsive Design: Clean, professional layout with card-based components
- Intelligent Rate Limiting: Model-specific rate limits with automatic optimization
- Translation Cache: Avoid re-translating identical content
- Batch Processing: Process 5-20 entries per API call based on token limits
- Auto-save: Automatic saving of successful translations
- Pause/Resume: Control translation process in real-time
- Error Handling: Robust error handling with retry logic
- Progress Preservation: Resume from where you left off
- Graceful Cancellation: Clean resource management
- .NET 8.0 Runtime (Windows)
- Google Gemini API Key (free from AI Studio)
- Download the latest release from Releases
- Extract the ZIP file
- Run
SimpleXmlEditor.exe
- Get API Key: Visit Google AI Studio and create a free API key
- Configure: Click βοΈ Settings β Enter your API key β Refresh models β Select a model
- Load XML: Click π Load to open your XML localization file
- Translate: Select entries and click π― Translate Selected or π Translate All
The application works with Microsoft Excel XML format commonly used for game localization:
<?xml version="1.0" encoding="UTF-8"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet">
<Worksheet ss:Name="Localization">
<Table>
<Row>
<Cell><Data ss:Type="String">ui.menu.start</Data></Cell>
<Cell><Data ss:Type="String">Start Game</Data></Cell>
</Row>
</Table>
</Worksheet>
</Workbook>- Small batches: Use "First 10 rows" for testing
- Selected entries: Use Ctrl+click to select specific entries
- Full translation: Use "Translate All" for complete files
- Model selection: Flash models are faster, Pro models are more accurate
- Model limits: Each model has different rate limits (displayed in settings)
- Automatic delays: The app calculates optimal delays between requests
- Pause feature: Use pause if you hit rate limits
- Cache benefits: Identical texts are cached to avoid re-translation
- Batch processing: Reduces API calls by 90%+
- Translation cache: Avoids duplicate translations
- Model selection: Choose appropriate model for your needs
- Selective translation: Only translate what you need
- Gemini 3.0 Pro: Highest quality, lowest rate limits
- Gemini 2.5 Flash: Balanced speed and quality
- Gemini 2.0 Flash: Fast and efficient
- Gemini Flash Lite: Highest rate limits
- And more: All Gemini models supported
- Gemini 3 Pro: 5 requests/min, 50/day
- Gemini 2.5 Flash: 15 requests/min, 1500/day
- Gemini Flash Lite: 30 requests/min, 2000/day
- Visual Studio 2022 or VS Code
- .NET 8.0 SDK
- Windows 10/11
git clone https://github.com/yourusername/xml-ai-translator.git
cd xml-ai-translator
dotnet build SimpleXmlEditor/SimpleXmlEditor.csproj
dotnet run --project SimpleXmlEditor/SimpleXmlEditor.csprojSimpleXmlEditor/
βββ MainWindow.xaml # Main UI
βββ MainWindow.xaml.cs # Main logic & batch translation
βββ SettingsWindow.xaml # Settings UI
βββ SettingsWindow.xaml.cs # Settings logic
βββ SimpleXmlEditor.csproj # Project file
- API Calls: 90%+ reduction through batch processing
- Translation Speed: 5-10x faster than single-entry translation
- Cost Savings: Significant reduction in API costs
- Rate Limit Optimization: Smart delays prevent 429 errors
- 1000 entries β ~50-100 API calls (instead of 1000)
- Gemini 2.5 Flash: ~50-100 entries per batch
- Gemini Pro: ~10-20 entries per batch
- Token efficiency: 70% of model limits utilized safely
Contributions are welcome! Please feel free to submit a Pull Request.
- Additional AI providers (OpenAI, Claude, etc.)
- More XML format support
- UI/UX improvements
- Performance optimizations
- Bug fixes and testing
This project is licensed under the MIT License - see the LICENSE file for details.
- Google Gemini AI for powerful translation capabilities
- Microsoft WPF for the UI framework
- Newtonsoft.Json for JSON processing
- Material Design for UI inspiration
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: This README and inline code comments
Made with β€οΈ by Veloxcity
Transform your XML localization workflow with AI-powered batch translation!