VAM Plugin: VAM Translations v1.1

VAM Plugin: VAM Translations

v1.1: Updated for VaM v1.21.1.0


Please note: when using VAM Translations together with Acid Bubbles' Timeline plugin, the scene animation can considerably lag, as Timeline updates a lot of labels in short intervals, e.g. updating the percentage labels, forcing the Translations plugin to do a lot of translations in a short period and thus causing the lag. Unfortunately, I did not find a way to prevent this, therefore please be aware that using these two plugins together will most likely lead to lags, even on powerful machines.


A plugin that translates VAM to other languages, e.g. German:

Languages

Currently the following languages are provided:

German, French, Spanish, Italian, Portugese, Polish, Czech, Russian, Chinese (Simplified) and Japanese.

See the attached videos for a demonstration how it will look like in VAM.

Please note:

All languages are translated using Google translate.

I tried my best to optimize the translations and length of the texts in the languages that are familiar to me: German, French, Spanish, Italian and Portugese. Therefore, the translations should mostly be fine.

However, in Polish, Czech, Russian, Chinese and Japanese, for these languages I have no way to evaluate which translations are correct or false, therefore they probably have a lot of incorrect translations, are not consistent and are not optimzed for length.

VAM also has a lot of specific terms that are hard to translate by themselves, therefore please don't expect a perfect translation.

Please also note that the translations only cover the basic VAM installation, but do not cover any plugins from other creators or from the VAM Hub. It will include translations for my other plugins, though.

However, if you are running this plugin, it will automatically add all missing English translations that you encounter when using VAM. Missing translations will be added to the corresponding language text file with an empty translation.

If you are fluent in a foreign language and want to provide an updated proper translation for your language or add a new language that is not provided yet, please send me the translated text file and I'll gladly add it to the existing translations and credit you as the author of the translation.

Installation

Extract the downloaded zip to your VAM installation folder, where the VaM.exe is located.

To check if it was extracted correctly, go to the folder:
<VaM directory> \ BepInEx \ plugins
and check that you have the "VAMTranslation.dll" file and "VAMTranslations" subdirectory there.

Switching VAM to another language:
- First load any scene
- Open up the Main Panel
- Go to the "Session Plugins" tab
- Add a new plugin and choose the script "SettingsVAMTranslations.cs"
from the folder:
<VaM directory> \ Custom \ Scripts \ VAMPlugins \
- Open the Plugin menu for the newly added script
- Choose the language of your choice
- Important: Go to the "Session Plugin Presets" tab
- Press the button "Change User Defaults...",
- then press the button "Set Current As User Defaults"
- this will then use the chosen language permanently, even after you close VaM
- Restart VaM once after you changed the language so that the new language will be reloaded and take effect

See the attached videos: they show how the plugin script needs to look like after you have added it and how you choose the language.

Changing Translations

The translations can be changed by editing the text files in this folder:
BepInEx \ plugins \ VAMTranslations \
e.g. BepInEx \ plugins \ VAMTranslations \ German.txt:

The translations are listed in the format:

<English text, up to 150 digits> | <Translated Text>

As mentioned above, missing translations will automatically be added to the text file of the language that you're currently using when running VAM.

Existing translations can be changed in the text file while you are running VAM, but  translations that have already been loaded, will not be re-translated while VAM is still running. Therefore it is best to restart VAM after you have made changes to the translation file, so that the changes take effect.

As a general rule, numbers will not be translated, will automatically be ignored and will not appear in the text file. There can be special cases where numbers will still appear in the translation file, e.g. "+1 Min".

There are also multi-line texts, which have the special character \n  (line break) in them, e.g. "MSAA \nLevel | MSAA \nStufe", which will then be divided into two text lines:

When changing the text files, make sure not to change the encoding (UTF-8) of the text file, so that special characters, e.g. umlauts (ä, ö, ü) etc. will be displayed correctly in VAM.

Adding a new language

Unfortunately, even if you add a new language text file, e.g. "Swedish.txt", it will not automatically be added to the drop down list in the VAM Translation Plugin settings. Therefore, the easiest way to add a new language is to switch to an existing language, e.g. French and just replace all of the translations in the corresponding language file, e.g. "French.txt", so that you can test your changes and see the results directly in VAM.

If you are proficient with coding in C#, you could also add the new language directly in the plugin file:
<VaM directory> \ Custom \ Scripts \ VAMPlugins \ SettingsVAMTranslations.cs
You need to make 4 changes in lines: 23 to 33, 35 to 45, 76 to 89 and 112 to 123. The script will automatically be compiled by VAM and the changes take effect when you run VAM.

Alternatively, you can also send me the translated text file and I will add the new language to the drop down list directly. You will of course be credited as the author of the translation.

The Ignore List (Advanced feature - only required when changing translations)

There is also a special text file called "_Ignore.txt", which contains the texts that should be ignored and should not be translated, for instance: scene names, atom names, file names etc.

As an example, when you open the scene browser in VAM and get all of the scene names that you have currently installed, these scene names should not be added as missing translations to the translation text file, as this would add lots of unnecessary translations that you do not want translated anyway.

Therefore, the scene names have already been added to the ignore list, as well as many other objects.

The ignore list looks like this:

E.g. "SceneAtoms»CoreControl»WorldScaleAdjust»WorldMainUI»Canvas»FileBrowserWorld»MainPanel»FileHighlightText» | Ignore"

Each entry represents the hierarchy of the text's object name and its parent's object names to uniquely identify the text object in VAM.

If missing translations will be added to your translation text file that you want to the add to the ignore list, you can do the following:

All missing translations that will be added to the language text file will also be added to another special text file: the "_Output.txt" file:

This output file already contains the hierarchy name of all of the missing texts that have been added. Search in the _Output.txt file for the text that you want to ignore. Copy the entry to the "_Ignore.txt" file and add the " | Ignore" at the end of the line. The texts from this object will then be ignored in the future. You still have to delete the wrong translations that were already added to the language text file however.

The Ignore List - Replacements

Using the ignore list as described above, you can also replace only parts of a text with a translated text.

As an example: in the Hub Browser, you have the total number of plugins:
"Total: 12345". The total number of plugins changes each time you open up the Hub Browser, therefore we cannot add a translation for each count, e.g. "Total: 12333", "Total: 12444" etc. We only want to translate the "Total" part of the text.

Therefore, you can add a replacement like this in the "_Ignore.txt" file:

CoreControl»WorldScaleAdjust»WorldMainUI»Canvas»HubBrowsePanel»LeftBar»ShowingGroup»NumResourcesText» | Total

This is again the hierarchy of the object as described above, except that instead of the "| Ignore " part at the end, we specify the replacement name. This replacement name can be chosen freely, but it has to match with the translation file.

In the translation file, e.g. "German.txt", you have a corresponding entry that looks like this:

<Replace>»Total»Total:   | Gesamt:

The replacement rule always starts with the keyword <Replace>, followed by the replacement name that you have given in the "_Ignore.txt" file. So the "Total" word that is marked in bold in this example has to match in both files. The third part, the "Total: " is the original English text. At the end, after the pipe symbol ( | ) you have the translated text.

Therefore, when this rule is applied, it will translate the text:
"Total: 12345" to "Gesamt: 12345" in German.

The replacement rules are already added, e.g. for translating dates, times, week days and more in VAM.

By becoming a member, you'll instantly unlock access to 32 exclusive posts
32
Writings
By becoming a member, you'll instantly unlock access to 32 exclusive posts
32
Writings

VAM Plugins

creating plugins for VAM

VAM Plugins

creating plugins for VAM