Rain World loads a mod’s short translations from Text/Text_<language>/strings.txt. Ship an English file under Text/Text_eng/strings.txt, use namespaced keys, and look up those keys through global::InGameTranslator.Translate(System.String) or global::OptionInterface.Translate(System.String).
For a plaintext file, the first character is 0. The loader removes that character before parsing the remaining lines. Save the file as UTF-8 with CRLF line endings. A small file appears as:
0
rainworldmodding.remixsettings_show_hint|Show hint
rainworldmodding.remixsettings_hint_opacity|Hint opacityThe displayed lines must be separated with CRLF bytes. In escaped form, the beginning is 0\r\nrainworldmodding.remixsettings_show_hint|Show hint\r\n. An LF-only file does not match the inspected Regex.Split(text, "\r\n") parser.
Parsing rules
global::InGameTranslator.LoadShortStrings() reads the file as UTF-8 and inspects its first character. A 0 selects plaintext and is removed. A 1 selects the game’s encrypted form. Mods that author readable files only need the 0 header.
Each nonempty translation entry uses key|translation. The loader splits on every | and stores only segment 1. Later segments are discarded, so a short translation cannot contain a literal pipe through this format. Entries with an empty translation are ignored.
A line containing /// is treated as containing a comment, but truncation occurs at the first slash because the implementation uses Split('/')[0]. Keep comments on their own lines or after text that contains no slash. A URL or another value containing a slash on such a line can therefore be cut earlier than expected.
Namespaced keys reduce collisions between active mods. The loader processes active mod paths after the corresponding base game file, and later active mod paths replace an existing value for the same key. A key such as rainworldmodding.remixsettings_show_hint is safer than a generic key such as show_hint.
English and current language passes
The loader fills English short strings first, then loads the current language when that language has a file. A current language entry replaces its English value. If a translated file omits a key supplied by the mod’s English file, the English value remains available.
The base English strings.txt is required by the loader. If that file is absent, LoadShortStrings() returns. The current language pass also requires the corresponding base language file to exist. A mod file alone does not bypass those checks.
For each active mod included in a pass, the inspected path is:
<mod path>/Text/Text_<language short name>/strings.txtThe loader lowercases each constructed path, including the mod path. Use lowercase text/text_eng/strings.txt and consistent lowercase paths when packaging translations. The bundled Remix English file uses this layout. Case-sensitive platform behavior still needs a runtime test.
Translate interface text
global::OptionInterface.Translate(System.String) delegates to Custom.rainWorld.inGameTranslator.Translate(text). For empty input or the inspected debug-only missing-translation result, it returns the original text. Call it while building labels in OptionInterface.Initialize():
new OpLabel(65f, 462f, Translate("rainworldmodding.remixsettings_show_hint"));This pairs with the page construction in Remix settings. Translate labels and descriptions that players read. Keep ConfigHolder.Bind keys such as showHint unchanged because those keys identify persisted values in the configuration file.
global::InGameTranslator.TryTranslate(System.String,out System.String) returns true only when the translated result differs from the input. This is not a reliable key-existence test: a valid translation identical to its key returns false. Ordinary display code can use Translate directly.
The token <LINE> appears in bundled text and is consumed as a line break by UI helpers. The short-string loader stores segment 1 as parsed text. Whether a particular HUD label processes <LINE> depends on the UI helper that displays it. A custom HUD part should verify its chosen text renderer rather than assuming that the translator inserts a newline.
Visible key names for actions can be translated independently of their mechanics. Player input explains why a configured OpKeyBinder label and a Player.InputPackage action are separate concerns.
Runtime checks
This page records static source behavior. No language switch or mod translation file was tested in the game. Before release, load the English file, switch to one translated language, and confirm both a replaced key and an omitted key. Also test the packaged file bytes for the 0 header and CRLF separators, inspect the log for parser errors, and check whether the target control rebuilds its text after a language change.
Sources
global::InGameTranslator.LoadShortStrings(),global::InGameTranslator.Translate(System.String),global::InGameTranslator.TryTranslate(System.String,out System.String), andglobal::OptionInterface.Translate(System.String)inAssembly-CSharp.dll, SHA-256B6BE1D4E18CE219D21091B51564CB6A11C1E4106B41DE903EB8E58849CB16FDB. See Runtime reference.