AutoTranslator
AutoTranslator Automatically captures untranslated keys and UI text from RimWorld and other mods, and translates them in real time or in batches via a configured translation platform (Volcano Engine / Alibaba Cloud / Baidu), then writes the results back into the game and displays
AutoTranslator
Automatically captures untranslated keys and UI text from RimWorld and other mods, and translates them in real time or in batches via a configured translation platform (Volcano Engine / Alibaba Cloud / Baidu), then writes the results back into the game and displays them. Translations are persisted to the current language pack's Keyed/auto.xml, where they can be manually reviewed and locked (once verified="true", they will no longer be overwritten by the auto-translator).
The settings page has three toggles: Enable Dynamic Translation (master switch), Enable Translation Logging (writes to auto.xml), and Enable Real-time Translation (translate on-the-fly as text is intercepted). By default, only the master switch is on; the other two are off.
When real-time translation is off, only untranslated keys are recorded and no API call is made. Only after enabling it will the mod actually translate and rewrite the UI.
The settings page button Open Translation File opens the current language pack's auto.xml with your system's default program, so you can manually fix mistranslations in an external editor (for example, the machine translation wrongly turning Min/Max into "敏/马克斯"). After editing, add verified="true" to lock the entry.
When the current language is English, nothing will be written (English serves as the source-language baseline pack). Translations are also skipped in development mode.
This mod is a work-in-progress. It only implements automatic translation for text whose key is defined inside other mods but whose UI/display text was never intercepted. I got too tired to keep writing it.
The following are not yet implemented: intercepting hard-coded literal text in UI, one-click translation, LLM integration, and manual per-entry review.
Those interested can download the source code from https://gitee.com/nomadicooer/auto-translator and develop it further.
That said, it should already handle most automatic-translation needs.
Translation requires support from a translation platform — you'll need to purchase or apply for your own. Volcano Engine, Alibaba Cloud, and Baidu are supported, mainly for their free quotas.
Also, it's recommended to turn all toggles off after translating with this mod. There's no need to enable them again later, unless you want to re-collect and re-translate keys. You should keep the mod enabled, however, since the translation files live inside it.