# Manual Translation

Published 2024-03-03

# Introduction to V2.0 translation

Unlike the previous versions, 2.0 has native translation support. This is done using several different json files.

This file contains all the translation keys, the app will validate translation files against the contents of this file.

This file is important! It contains comments for some of the keys. You should always check this file for any comments before translating.

This file contains the base English translations. When translating use this as a reference point.

# Language json file format

The name of the language in the language itself.

The name of the language in English.

The ISO code of the language. Use the 2 letter code (ISO 639-1 Code).
https://www.loc.gov/standards/iso639-2/php/code_list.php

Caps locked comments are comments only visible to editors that use the json files. Usually they are just used to explain the structure of the file.

Comments that are capitalized in any other way are shown to users of the translation UI. They might contain comments from translators to each other.

This is how you actually translate. Just copy the key from keys.json and paste it, then add the translation.

# Example file:
{
  "name": "Suomi",
  "name_en": "Finnish",
  "iso_code": "fi",

  "_GLOBALS": "Please leave a space here to seperate the different sections of the translations.",

  "confirm": "Vahvista",
  "cancel": "Peruuta",
  "yes": "Kyllä",
  "no": "Ei",
  "continue": "Jatka",
  "loading": "Ladataan...",
  "success": "Onnistui",
  "error": "Epäonnistui",
  "done": "Valmis",
  "set": "Asetettu",
  "setting": "Asetetaan...",
  "unknown": "Tuntematon",

  "_BACKEND": "Please leave a space here to seperate the different sections of the translations.",

  "main.errors_and_warnings": "Virheet ja varoitukset lokitiedostoissa:",
  "main.errors": "Virheitä:",
  "main.warnings": "Varoituksia:",
  ...
}

# Translation process

  1. Go to the ETS2LA Discord server, then the #roles channel and press the button to get the translator role.
  2. Go to the #translations forum and find the post of the language you want to translate. If it doesn't exist, create a new post.
  3. If you are no the first person, then check with others on the current progress of the language (you can use @here to ping everyone that has commented on the post).
  1. Copy the en.json file and rename it to your language's ISO code.
  2. Change the name, name_en and iso_code fields to match your language.
  3. Start translating the keys. Make sure to check the comments.json file!
  1. If you didn't do so already, test the language in the app to make sure everything works.
  2. If you are not the only translator, I suggest asking for other people's opinions.
  1. Send the edited file in the discord forum of your own language. Then ping either DylDev or Tumppi066 to update the translations with your file.
# Done!

# Translation Guidelines

  1. Be consistent! If you translate a word one way, keep it that way throughout the translation.
  2. Work with others! This is often a multi-person job, so make sure to communicate with the others to setup your own guidelines.
    1. Regarding this if you want me to pin a message in the post, then just ask!
  3. This is not a job! If you don't have time to translate immediately, that's fine. Most of the time there are others and if you are the only translator, then don't worry about it!
  1. Preserve special characters! If the English text has special characters (like \n, \t, : etc... or spaces at the start or end), make sure to keep them in the translation.
  2. Do not add special characters! If the English text doesn't have special characters, don't add them.

We use variables in the translations to add dynamic content. They are written as {0}, {1}, {2} etc... and are replaced with the actual content when the translation is used. You can see what the variables mean in the comments.json file, this file also often includes examples of how the translation would look in english.

MAKE SURE TO KEEP ALL VARIABLES