Skip to content

3dever/ue-ai-translate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

ue-ai-translate — OpenAI Translation Tool for Unreal Engine .po Files

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.

image


📁 Setup

image

  1. Download or clone this repository.
  2. Place all files from script folder to your Unreal Engine localization folder (e.g., Content/Localization).
  3. Run the setup script:
ai-translate_install.bat

This 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.bat

For Linux:

Make sure that tkinter is installed

sudo apt-get install python3-tk

🔑 Getting an OpenAI API Key

  1. Log in or sign up to https://platform.openai.com/.
  2. Add $ to your balance
  3. Visit OpenAI API Keys.
  4. Click Create new secret key.
  5. Copy the key (starting with sk-...).
  6. 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).


🚀 How to Use

  1. Enter your OpenAI API key.
  2. Choose a model (gpt-4o-mini, gpt-4, gpt-3.5-turbo, etc.).
  3. Select a localization category (e.g., Game).
  4. Choose to:
    • Translate all .po files in that category (excluding English), or
    • Select a specific .po file.
  5. Set the batch size (number of entries per GPT request).
  6. Click Start Translation.

📊 Output & Logs

image image

  • Only untranslated lines are modified.
  • Process summary and OpenAI token usage are shown after completion.
  • Translations are written back to the same .po file.

🛡️ Notes

  • Supports .po format used by Unreal Engine.
  • Designed to work inside Content/Localization/YourProject structure.

About

Python script that allows to translate Unreal Engine files with OpenAI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors