Language
All of RustEdit's text, from menu names to tooltips, comes from language files. Each language is one .json file in the Localization folder in RustEdit's folder. You can pick a language, and you can make a translation of your own.
Change the language
The language is a setting in the settings file. It is not in the Settings dialog.
-
Close RustEdit.
-
Check that the language file is in the
Localizationfolder, for exampleGerman.json. -
Open
Configuration/configuration.jsonin a text editor. -
Find the
Translationsection and setLanguageto the file name without.json:"Translation": {"Language": "German"}, -
Save the file and start RustEdit.
If RustEdit cannot find or read the file for that language, it uses English and sets Language back to English.
RustEdit comes with English only. For another language, make a translation or get a language file from somebody who made one.
Make a translation
- Close RustEdit.
- In the
Localizationfolder, copyEnglish.jsonand name the copy after your language, for exampleGerman.json. - Open the copy in a text editor that saves UTF-8.
- Translate the text on the right side of each line. Keep the key on the left as it is.
- Set
Languageto your file's name, as in Change the language, and start RustEdit to check your work.
A language file is a list of keys and texts:
{
"Global.File": "File",
"Interface.Layouts": "Layouts",
"SettingsDialog.Reset": "Reset to default",
"TransformWidget.Move.Tooltip": "Movement tool\nHotkey: W"
}
The same lines in a German file. The keys stay the same, only the texts change:
{
"Global.File": "Datei",
"Interface.Layouts": "Layouts",
"SettingsDialog.Reset": "Auf Standard zurücksetzen",
"TransformWidget.Move.Tooltip": "Verschieben\nTaste: W"
}
Rules for the text
- Keep the keys. RustEdit finds each text by its key. A changed key is a missing text.
- Keep
{0},{1}and so on. RustEdit puts a number, a name or a path there. You can move them inside the sentence. - Keep
\n. It starts a new line. - Keep tags such as
<b>and</b>. They make text bold. - Keys that end in
.Tooltipare the text you see when you hover over something. - Keys that start with
Enum.are names in dropdown lists, such asEnum.Grass. One key is used in every list that has that name. - Settings labels have the group name in the key, such as
Camera.FOVorInterface.Scale.
After a RustEdit update
When RustEdit starts with your language, it checks your file against its own list of texts:
- Texts RustEdit added are put into your file in English. Search your file for English to find them.
- Texts RustEdit no longer uses are taken out of your file.
RustEdit then saves your file with the keys in order.
RustEdit rewrites your file when texts are added or taken out. Keep a copy of your translation outside the Localization folder.
English.json
RustEdit writes English.json when it starts if the file is not there. When English.json is there, RustEdit uses the text in it, so an edit to it changes RustEdit's English text.
After an update, the English text of some lines can be newer than your English.json. To get RustEdit's current English text, close RustEdit, delete English.json and start RustEdit again.
Letters the interface can show
The interface font has Latin, Greek and Cyrillic letters, so languages such as German, Polish, Greek or Russian work. It has no Chinese, Japanese, Korean or Arabic characters, so those languages do not show correctly.