A realtime XUnity.AutoTranslator endpoint and local configurator for game
translation. The endpoint keeps requests single-turn and supports Qwen-MT,
DeepSeek Chat Completions, terminology constraints, retries, concurrency
limits, and translation-cache alignment.
The screenshots use fictional Example RPG data.
- One endpoint ID:
RealtimeTranslate. - Native Qwen-MT requests with
termsandtm_listtranslation options. - A dedicated DeepSeek Chat Completions provider with optional JSON output and disabled thinking for short realtime requests.
- A glossary for character, place, item, organization, title, skill, and lore terms.
- Configurable concurrency from 1 to 1024, bounded retries, and a consecutive error limit.
- Atomic glossary reloads without blocking active translations.
- TXT terminology extraction and reviewable translation-cache alignment in the configurator.
Install XUnity.AutoTranslator for the target game first. Download
XUnity.RealtimeTranslator.dll and FuzzySharp.dll from the
latest Release
and copy both files to:
<game directory>/<game>_Data/Managed/Translators/
The endpoint is loaded by XUnity.AutoTranslator and uses these host assemblies
from the game's Managed directory:
XUnity.AutoTranslator.Plugin.Core.dllNewtonsoft.Json.dll
Launch the configurator from the repository root when the repository is placed next to the game:
.\LaunchConfigurator.cmdFor a separate repository and game directory:
pyw -3 .\XUnity.RealtimeTranslator.Configurator\configurator.py `
--game-root 'C:\Games\ExampleRPG'Use --no-browser to print the local URL without opening a browser. The
default port is 17873; override it with --port.
The configurator edits the RealtimeTranslate endpoint and can switch between
Qwen-MT and DeepSeek. After saving settings, restart the game so XUnity loads
the updated endpoint configuration.
Minimal Qwen-MT settings:
[Service]
Endpoint=RealtimeTranslate
[RealtimeTranslator]
Provider=QwenMT
MaxConcurrency=4
MaxRetries=10
MaxTermsPerRequest=64
UseTerminology=True
[QwenMT]
APIKey=YOUR_QWEN_API_KEY
Model=qwen-mt-flash
BaseUrl=https://dashscope.aliyuncs.com/compatible-mode/v1For DeepSeek, set Provider=DeepSeekV4 and configure APIKey, BaseUrl, and
Model in [DeepSeekV4].
The default glossary path is AutoTranslator/QwenMTTerminology.json. It accepts
either a JSON array or an object containing a terms array:
[
{
"source": "アステリア",
"target": "阿斯特莉亚",
"category": "character",
"enabled": true
}
]Add names, places, and items whose spelling must remain stable. The configurator can extract candidates from TXT files and align existing cache entries with enabled glossary targets.
Build with the .NET SDK and point XUnityReferencesDir at the game's
*_Data/Managed directory:
$managed = 'C:\Games\ExampleRPG\ExampleRPG_Data\Managed'
dotnet build '.\XUnity.RealtimeTranslator\XUnity.RealtimeTranslator.csproj' `
-c Release "-p:XUnityReferencesDir=$managed"The output is:
XUnity.RealtimeTranslator/bin/Release/net472/XUnity.RealtimeTranslator.dll
XUnity.RealtimeTranslator/bin/Release/net472/FuzzySharp.dll
The configurator uses Python 3 at runtime. Build its React/Vite frontend with Node.js and pnpm:
pnpm --dir '.\XUnity.RealtimeTranslator.Configurator\frontend' install
pnpm --dir '.\XUnity.RealtimeTranslator.Configurator\frontend' buildThe production files are written to
XUnity.RealtimeTranslator.Configurator/web and served by configurator.py.
py -3 -m unittest discover `
-s '.\XUnity.RealtimeTranslator.Configurator\tests' -v
pnpm --dir '.\XUnity.RealtimeTranslator.Configurator\frontend' ui-checkui-check expects a running configurator, Microsoft Edge, and a test game
directory.
XUnity.RealtimeTranslator/
*.cs C# endpoint and runtime helpers
XUnity.RealtimeTranslator.csproj
XUnity.RealtimeTranslator.Configurator/
configurator.py Local HTTP bridge and CLI
translator_config.py Config and glossary state
frontend/ React/Vite source
web/ Production frontend
LaunchConfigurator.cmd Windows launcher
docs/zh.md Chinese documentation
docs/screenshots/ README screenshots


