Language Modding Tutorial
--- Supported by Alpha v0.7 and later ---
Download Dwelvers language checker editor v1.1 (14.09.17): www.dwelvers.com/files/modding/language/DwelversLanguageEditorV1.1.rar
Download the latest language files (14.09.23): www.dwelvers.com/files/modding/language/langfiles/DwLang-2014-9-23-21-28-12.rar
Note: It is NOT recommended to extract these files straight into the game folder and overwrite existing files! This is because the language files more of the time more up to date than the game is. The editor should be placed in a SEPARATE folder, and then the language files can be extracted into that folder so that the "media" folder is in the same folder as the Editor.
Translations already in progress
(post in this topic if you want to help with translation, I will not add anyone before I see that more than 75% of the translation has been made)
If you want to join any translation group PM them and discuss what could you help with.
How it works
When starting up Dwelvers Alpha 0.7 or later you will see the launcher
Here the player have the option to choose a language, as a default this language is English, but if anyone would like to translate the game to another language this is fully possible.
Create a new language
In the game folder "media\language" you will see the file "default.xml". When the game starts up it will load all xml files in this folder. So to add a new language you need to copy the "default.xml" file and rename it to something else, preferably the language you want to translate it too. So in my case I make a copy of it and rename it to "swedish.xml".
So once you have copied and renamed the file you can start edit it.
The first thing you can start doing is remove the warning text that is in the beginning of the file, what this does is too warn the user for modifying the default language file, but as we are about to create a new language we don't need to worry about this.
You may read the "readme text", but I will cover most of it here so it will not be necessary.
So if we go straight down the file until we see the name <language>, this is where the xml code starts.
Name your language
First of you can change the <title> from "English" (as it is by default) to the name of the language you want to translate it too. In my case I would put "Swedish".
The next step is the <extension>, this one is empty by default, but if you are about to create a new language you need to fill it in. If the translation is Swedish you may choose "sw", if German "ge", if Chinese "ch" and so on. The reason for this is "extension" name is that there are other language files in the media folder, and for the game to load the proper language file it will need what extension to the file it will use.
Almost all language files contains the title of the object and also a description of it in English. But if I want the Swedish translation I will have to make a copy the language file, translate it and rename it to "language-sw.xml", then the game will load this file first hand before the language.xml file. This is if I have chosen the language Swedish in the launcher and had the <extension> set to "sw" in the swedish.xml file.
If the game can't find language-sw.xml it will load language.xml instead by default. This is so that new updates with new items still will be loaded into the game even if the language file is not up to date.
The next step is to actually start the translation. Inside the element <translation> you will see a list of <t> values that may look like this:
<t value = "Fishing">Fishing</t>
<t value = "Going to bed">Going to bed</t>
<t value = "Baking">Baking</t>
The "value = "keyword"" in these lines is the keyword for the translation, these should never be modified! But the text inside the <t></t> parameters can be. So if I want to translate these three lines into Swedish it will look something like this:
<t value = "Fishing">Fiskar</t>
<t value = "Going to bed">Går till sängs</t>
<t value = "Baking">Bakar</t>
So to complete the translation every <t></t> has been translated. Once this is done save the xml file and reload the launcher, and now you will have a new language in the game
There are also other files that will need translating as described above, all items and creatures has a own language file with titles and descriptions, and as soon as a new item or creature is introduced into the game there will probably be a little gap in the translation.
Updated translation files
(Download link at the top of this topic.)
From now on I will try to post the language files here as often as possible to keep those that want to help with the translation as up to date as possible. I have also included my own Swedish translation with the translation files just so that it will be easier to compare it.
A couple of days before every release I will make an announcement that I have stopped modifying and adding translation files, at this point you can send me your translation files and I will include the language with the next release. I will give you credit for it in the game, not with the upcoming release, but before the steam release.
Dwelvers language checker editor
(Download link at the top of this topic
I have included a tool to make it much easier for the translator to know what files needs to be updated or added. It looks like this:
Here the player can enter the name of his language file:
This is the same name as the filename of the language I have in the media/language folder:
Once the name of the language file has been entered in the editor it will start checking the language files and output the result:
In this case the editor output two warning as seen in the screenshot. One warning that it is missing the translation for the "Trading routes", this means that the translator will have to add this new line into his own language file. The second warning is that a "Media/Items/BarbarianAxe/Language-SE.xml" file is missing. This will happen when a new item is introduced to the game, the translator will then have to create this file with his own translation. Once this is done he can press the check button in the editor once again to see if everything is okay.
And as seen in this screenshot the editor didn't generate any warnings or errors, so now the translation is up to date with the game.