Back to 9Minecraft
Wiki 9Minecraft Wiki 9Minecraft
Vault Patcher Wiki › Guides › How to Use Vault Patcher as a Mod Developer for Localization

How to Use Vault Patcher as a Mod Developer for Localization

Why Use It in Development

Vault Patcher exists so developers can avoid rewriting hardcoded strings by hand. Instead of refactoring every literal into a translation call, you can declare patches that redirect those literals to localization keys, letting translators work without touching code.

Workflow

1. Identify the hardcoded strings in your mod that should be translatable — GUI labels, tooltips, status messages, and config text are the usual candidates.

2. For each, decide on a stable translation key and document it. Keys should describe the purpose, not the current English wording, so they survive rewording.

3. Create patch entries mapping each literal to its key, and ship a default language file so the mod still displays sensible text out of the box.

4. Test with the game language switched to a locale you have provided, and again with one you have not, to confirm fallback behavior is acceptable.

5. When you later refactor a string into a proper translation call, remove its patch entry to avoid double handling.

Best Practices

  • Treat patch files as part of your release, versioned with the mod, so they stay in sync with the literals they target.
  • Avoid patching strings that contain runtime data unless you preserve every placeholder exactly.
  • Document which strings are patched and which are natively localized, so contributors do not duplicate work.
  • Remember this is a client-facing convenience; server-side messages may need separate handling.