TranslationAPI
Allows mods to translate text boxes. Does nothing on its own.
About this mod Author’s original text
Translations API
BepInEx mod for ULTRAKILL that lets other mods register word/string
replacement pairs, applied to every bit of text the game renders through
TextMeshPro (HUD, menus, tooltips, subtitles, the cheat menu, etc.).
It ONLY Works on TextMeshPros.
- GUID: com.nico.translationsapi
- Depends on: BepInEx, HarmonyX (standard ULTRAKILL modding stack)
How it works
Every registered (source, replacement) pair is matched as a substring,
anywhere it appears in the text — not whole-word. Replacements are applied
in the order they were registered, so a later rule can end up matching text
produced by an earlier rule.
"gun" -> "pew pew" // "shotgun" becomes "shotpew pew"
"a" -> "AHHH" // every lowercase 'a' becomes "AHHH"
" " -> "" // strips every space
If two mods register the same source string, the most recently registered
one wins, and a warning is logged to the console so conflicts are easy to
spot.
Usage (for mod authors)
Add a reference to TranslationsAPI.dll, and in your plugin's BepInDependency:
[BepInDependency("com.nico.translationsapi")]
Then register your replacements, typically in Awake():
using TranslationsAPI;
TranslationRegistry.RegisterTranslation("gun", "pew pew");
TranslationRegistry.RegisterTranslation("a", "AHHH");
TranslationRegistry.RegisterTranslation(" ", "");
To remove a registered translation:
TranslationRegistry.UnregisterTranslation("gun");
API reference
| Method | Description |
|---|---|
| RegisterTranslation(string source, string replacement) | Registers a replacement. Ignored (with a warning) if source is null/empty. Overwrites an existing registration for the same source (last wins), logging a warning. |
| UnregisterTranslation(string source) | Removes a previously registered translation. No-op if it wasn't registered. |
Known limitations
- Only text set through TMP_Text.text is caught. If some UI element in
ULTRAKILL doesn't go through TextMeshPro, it won't be affected.
- Substring matching means short/common sources (like "a" or " ") will
match very aggressively — that's by design, but worth knowing before you
register something too broad.
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.
Install these first, or the mod will not work: