Valheim Easy Translate
A simple to use translation library
About this mod Author’s original text
Easy-Translate
Easy to use Translation Framework for Mods or other Projects
Initialize Translation
Init(string environement, string locale);
EasyTranslate.EasyTranslate easyTrans = new EasyTranslate.EasyTranslate();
easyTrans.Init("ch.easy.develope.vh.diving.mod", "EN_en");
Setup Locales
setLocales(Dictionary dict);
Define all the locales u want to translate
var locales = new Dictionary();
locales.Add("EN", "en");
locales.Add("DE", "de");
locales.Add("RU", "ru");
easyTrans.setLocales(locales);
Setup Translations
SetupKeys(string key, string translation);
This will generate foreach locale a template including your keys and values
in your initialized locale (in this example "EN_en)".
The templates are located at "///translation.txt"
Key/Value seperator is "=/="
Go to next key is seperated by "=NL="
You can use linebreaks in your translation strings.
var translation = new Dictionary();
translation.Add("main_class_title", "Im a title!");
translation.Add("main_class_btn_txt", "Im a button text");
translation.Add("main_class_description", "Im on the first line \n Im on the second line");
easyTrans.SetupKeys(translation);
Get Translation by Key
Init(string key, string default_value);
default_value is by defualt empty and fires when the key was not found. but you can define one by adding a second param.
easyTrans.getTranslation("main_class_title");
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file. In multiplayer, the host and every client need the same mods installed.