Creating Translation Files

Status
Not open for further replies.

k1lly0u

Administrator
Staff member
If you are familiar with localization in Oxide/uMod then this will be simple for you. Translation files are just .json files containing all the text from within the editor. These files can be found in the 'Localization' folder in the editors root directory

Creating a new language file
Start by duplicating the English.json file and renaming the duplicate to the name of your language.

Open the new file in any text editor. Inside you will see something like this
Code:
{
  "File": "File",
  "Edit": "Edit",
  "View": "View",
  "Help": "Help",
  "Terrain Tool": "Terrain Tool",
  "Prefab List": "Prefab List",
  "Terrain Paint": "Terrain Paint",
  "Road Tools": "Road Tools",
  "River Tools": "River Tools",

Each individual string has 2 parts, the key on the left, and the value on the right. Do NOT edit the key, this is what is used by the editor to pick the correct string to display.

Without editing any keys you can then proceed to translate the values, making sure that you respect the formatting and all the symbols in the file, if you stick to editing between the quotation marks everything should be fine.
ex.
Code:
"File": "Fichier",
"Edit": "modifier",
"View": "Vue",
"Help": "Aidez-moi",

When you are done save the file and run it through a JSON validator ( https://jsonlint.com/ ) to ensure you haven't made any mistakes with the formatting. If everything is good then you will be able to change the language via the editor.

There are 2 places you can change the language, the first and easiest being the drop down box in the top left corner of the main menu
fc583f81fa18e6f085e605c2ce5789c5.png

The other being in the Help/Languages section of the in game menu
 
Status
Not open for further replies.
Top