Skip to content

Locon213/TranslatorHoi4

Repository files navigation

🌍 TranslatorHoi4

Next-Gen AI Translation Tool for Paradox Games

Release Build Status License Python

English | Русский


Translate huge mods in minutes, not days.
Stop wasting time on manual translation. Harness the power of GPT-5, Claude, and Llama 4 to localize your mod with context awareness.

Аннотация 2026-01-14 024843

⬇️ Download for Windows   •   🐧 Download for Linux (Ubuntu)   •   💬 Report Bug


⚡ Why TranslatorHoi4?

Modding is fun. Translating thousands of lines of code is not. Existing tools are either too simple (Google Translate breaks code) or too expensive.

TranslatorHoi4 solves this:

  • Context Aware: It knows it's translating a HOI4 mod. It tries to preserve variables, color codes (§Y), and formatting.
  • Wallet Friendly: Use Free providers (G4F), Cheap (Groq/Fireworks), or Premium (OpenAI/Anthropic).
  • Modern UI: No more command line. A beautiful Windows 11-style interface.

🎮 Supported Games

Game Status Notes
Hearts of Iron IV Fully optimized prompts
Crusader Kings III ⚠️ Works, prompts behave generically
Europa Universalis IV ⚠️ Works, prompts behave generically
Stellaris ⚠️ Works, prompts behave generically

✨ Key Features

🧠 Flexible AI Backend

  • Cloud Power: Support for OpenAI (GPT-5), Anthropic (Claude 4.5 Sonnet), Google Gemini, DeepL.
  • Speed & Economy: Blazing fast translations with Groq and Fireworks.ai (Llama 4, DeepSeek).
  • Free & Privacy: Use Ollama to run models locally on your GPU, or G4F for free web access.

🛠️ Built for Modders

  • Smart Batching: Handles huge localization files by splitting them into safe chunks.
  • Glossary System: Force specific terms (e.g., Manpower -> Lidská síла) to ensure consistency.
  • Code Safety: Regex filters prevent the AI from translating code keys and variables.
  • Resume Capability: Stopped halfway? The tool skips already translated lines next time.

🚀 Installation

Windows (Recommended)

  1. Go to the Releases Page.
  2. Download the TranslatorHoi4_Windows.zip file.
  3. Extract it and run TranslatorHoi4.exe.

    Note: If your antivirus flags the file, it is a false positive caused by PyInstaller. The code is 100% open source.

Linux (Ubuntu) - Pre-built Binary

  1. Go to the Releases Page.
  2. Download the TranslatorHoi4-ubuntu-latest.tar.gz file.
  3. Extract it and run the executable inside.

Linux / Source Code

For other distributions or if you prefer to build from source:

# Clone the repo
git clone https://github.com/Locon213/TranslatorHoi4.git
cd TranslatorHoi4

# Setup environment
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

# Run
python -m translatorhoi4

📊 AI Providers Cheat Sheet

Not sure which provider to choose?

Provider Best For... Cost Speed
Groq The Best Value. Extremely fast, very cheap, good quality (Llama 4). $ ⚡⚡⚡⚡⚡
OpenAI Top Quality. Best for complex lore and flavor text. $$$ ⚡⚡
Claude Natural Writing. Great for events and descriptions. $$$ ⚡⚡
G4F Zero Budget. Free, but unstable. Good for testing. Free
Ollama Privacy. Runs on your own PC. No data leaves your room. Free ⚡ (Depends on GPU)

🤝 Contributing

We welcome pull requests! If you want to add a new AI provider or fix a bug:

  1. Fork the repository.
  2. Create your feature branch (git checkout -b feature/AmazingFeature).
  3. Commit your changes.
  4. Open a Pull Request.

📄 License

Distributed under the MIT License. See LICENSE for more information.


Made with ❤️ by Locon213
Don't forget to star the repo if this tool saved your time! ⭐

About

Cross-platform graphical tool in PyQt6 for translating localization files Paradox (HOI4, CK3, EU4, Stellaris) with AI

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages