Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
BaconTranslations
One translation layer for every mod's text: any number of languages, a switch per language and per mod, plain text files you edit outside the game. Works with XUnity translation mods, and removing a translation brings the original text back.
By baconya
| Last updated | 23 minutes ago |
| Total downloads | 1 |
| Total rating | 1 |
| Categories | Mods Misc BepInEx Client-side Translations AI Generated |
| Dependency string | baconya-BaconTranslations-1.0.1 |
| Dependants | 1 other package depends on this package |
This mod requires the following mods to function
BepInEx-BepInExPack
BepInEx pack for Mono Unity games. Preconfigured and ready to use.
Preferred version: 5.4.2305README
BaconTranslations
One translation layer for every mod's text.
Any number of languages · A switch per language and per mod · Plain text files · Works with XUnity translation mods
BaconTranslations puts a translation on any TextMeshPro text in the game, from any mod, and on the terminal's pages. Translations are plain text files you can edit with any text editor, also while the game runs. Nothing is written into other mods' files, so removing a translation, or BaconTranslations, brings every mod's own text back.
Choosing what you see
Click the LANGUAGE button in the top right of the main menu (or edit bacontranslations.cfg / LethalConfig):
- Language: Automatic, Original, or any language folder that's installed.
- Automatic follows the language a translation mod set XUnity AutoTranslator to.
- Original shows every mod's own text, also over XUnity.
- Sources and mods: one switch per mod under each source (Your files, installed translation mods, XUnity), plus ALL ON / ALL OFF per source. Turn any mod or source off and its original text comes back at once; turn it back on and its translations return cleanly.
- Untranslated parts: whenever a mod (including a newly added one) shows text with no translation yet, it appears under UNTRANSLATED PARTS with its missing-line count. Click any mod + COPY PATH (or EXPORT ALL) to write ready-to-fill
original=template files intoBepInEx/config/BaconTranslations/<Language>/. - Full Polish template: ships with Polish
.txtfiles for the base game (Game.txt), Terminal (Terminal.txt), the LANGUAGE panel itself (BaconTranslations.txt), all Bacon mods, and common pack mods — copy thePolskifolder and rename it to start a new language. - RELOAD: re-scans language folders and reloads every
.txtfile without restarting. Adding a new language folder inBepInEx/config/BaconTranslations/<Language>/shows up and works live. - Shrink long lines: a translated line longer than the original gets smaller until it fits its box, down to 55% of its size.
- Font for missing letters: the Windows font used for letters the game's fonts lack, such as ą, ł or ж.
Every change shows at once, without a restart.
What it never translates
- Text without letters, such as
+,-,100%or a number. - Text you type, the chat, and anything inside an input field.
- Text that a mod switched off owns.
Code that reads a label back still gets the original text, so mods that compare their own labels keep working.
Writing a translation
A language is a folder; its name is the language's name, such as Polski or Deutsch. Put your folders in BepInEx/config/BaconTranslations/. Every .txt file in a language folder is read, so you can keep one file per mod, such as Polski/BaconRPG.txt. The file names also add those mods' switches to the config.
Each line is original=translation, the same format as XUnity AutoTranslator's:
// A comment
Enemy spawn rate=Częstotliwość wrogów
{1} XP=PD: {1}
YOU COMMENDED {1}=WYRÓŻNIENIE DLA: {1}
Line one\nline two=Pierwsza linia\ndruga linia
r:"^LEVEL (\d+) OF (\d+)$"=POZIOM $1 Z $2
{1},{2}up to{9}stand for numbers in the text, in order. They can be moved around in the translation. If the text isn't a number there, such as a name,{1}takes any text.- A line in capitals, such as
LEVEL 3, also finds a line written in normal case, and is shown in capitals. - Text with several lines or rich text tags is also translated line by line, and piece by piece between tags.
\nis a line break, and\=is an=that belongs to the text.r:"..."lines are regular expressions, with$1for each group.
Saving a file in BepInEx/config/BaconTranslations updates the game at once.
Missing lines. Turn on Collect missing lines in the config and play. Every line that has no translation yet goes once into BepInEx/config/BaconTranslations/<Language>/_missing/<Mod>.txt, as original= lines ready to fill in. Move the filled lines into a file next to the others.
For translation mods
A translation mod only needs a BaconTranslations/<Language> folder of .txt files anywhere in its package. BaconTranslations finds it on its own, and the player's own files in the config folder override it.
Translation mods made for XUnity AutoTranslator keep working as they are:
- XUnity asks BaconTranslations before it puts a translation on screen, and follows its switches.
- It stays off text without letters, typed text, text BaconTranslations already translated, and mods that are switched off.
- If the translation mod that set XUnity up is removed, the files it left in the config folder are ignored, and the original text comes back.
Nothing of XUnity's is changed on disk.