-
Notifications
You must be signed in to change notification settings - Fork 26
Creating translations
In Maid Fiddler for COM3D2, translations are stored in JSON files. This allows to group translations easier and makes it simpler to handle translations in code.
You can always take an example from existing translation files when creating new translations.
Next, some parts of the translation files are explained:
-
DO NOT EDIT THE KEYS! The keys are on the left side of the
:
. For instance, in"key1": "banana", "key2": "apple"
key1
andkey2
are keys. Only edit the text on the right side!
The very first section in the TL file is reserved for information about the game.
An example of the section looks like this:
"info": {
"language" : "English",
"version": "1.0",
"authors": ["Geoffrey Horsington (@ghorsington)"]
}
-
language
is the display name that will be shown in Maid Fiddler GUI. Required in order to be shown in GUI. -
version
is the version of the translations. Currently not used in GUI, but may be used in future. -
authors
is an array of authors of the translation file. You can add more authors by separating them with a comma:"authors": ["Geoffrey Horsington (@ghorsington)", "John Doe", "Jane Doe", "Some Guy"]
titles
is an array of subtitles that are shown in the window title.
For example, setting the titles to the following value:
"titles" : ["P H O T O M O D E"]
will cause the GUI to show it as follows:
You can add multiple titles, like:
"titles": ["Title 1", "Title 2", "Title 3"]
In that case Maid Fiddler will choose a random title every time the GUI is restarted.
The last section contains translations for all GUI elements.
It is highly suggested to copy the section from the English translation and edit it.
It is important that the JSON file is valid! If it is not, Maid Fiddler will not display it as a selectable language.
Use a JSON validator to check that a JSON file is of valid form.