A Python-based GUI tool for batch-translating Unreal Engine localization files (.po) using OpenAI's GPT models.
The provided .bat files are for Windows, but the Python script also works on Linux - just make sure all dependencies are installed.
- Download or clone this repository.
- Place all files from script folder to your Unreal Engine localization folder (e.g.,
Content/Localization). - Run the setup script:
ai-translate_install.batThis will:
- Install Python (if not already installed).
- Install required packages:
openai,polib,python-dotenv.
If Python is already installed, you can launch directly using:
ai-translate.batFor Linux:
Make sure that tkinter is installed
sudo apt-get install python3-tk
- Log in or sign up to https://platform.openai.com/.
- Add $ to your balance
- Visit OpenAI API Keys.
- Click Create new secret key.
- Copy the key (starting with
sk-...). - Paste it into the GUI when prompted.
Your key will be saved to a local ai_translate.key file (add it to git ignore files if you need to keep it privately in your repo).
- Enter your OpenAI API key.
- Choose a model (
gpt-4o-mini,gpt-4,gpt-3.5-turbo, etc.). - Select a localization category (e.g.,
Game). - Choose to:
- Translate all
.pofiles in that category (excluding English), or - Select a specific
.pofile.
- Translate all
- Set the batch size (number of entries per GPT request).
- Click Start Translation.
- Only untranslated lines are modified.
- Process summary and OpenAI token usage are shown after completion.
- Translations are written back to the same
.pofile.
- Supports
.poformat used by Unreal Engine. - Designed to work inside
Content/Localization/YourProjectstructure.



