Custom language files
Language files are pretty straight forward to make, and they can be uploaded to the workshop.
Contents
Creating your language file
You should start from the english.lang
file from the res/language
folder in your game directory. Copy this file and paste it in the same folder, giving it a different name, such as dutch.lang
.
Giving your language a name
At the very top of your language file, you can add a name
attribute, like this:
<lang name="Nederlands">
This will then show up in the game when selecting a language. If you don't provide this name, it will use the filename of the language for the display name.
String parameters
Strings can have parameters, which are filled in by the game. Parameters are written within percentage characters, and are not directly translated as they are required for the game to properly put values in the string.
For example, in the below string, %name%
will automatically be replaced with the character name, %title%
with the character's title, etc.
<string name="hud.character.title">%name% the %title%, a level %lvl% %class%</string>
Uploading to the Steam Workshop
See Uploading to the workshop on how to upload your language file to the Steam Workshop.
Keeping it up to date
Keepig your language file up to date can be a chore. Things get added/removed/changed but you're not entirely sure what changed. To solve this, we maintain a Github repository of all English language file changes. You can look through the git commits to figure out what exactly changed with each version.