Difference between revisions of "Custom language files"

From Heroes of Hammerwatch wiki
Jump to: navigation, search
(Created page with "Language files are pretty straight forward to make, and they can be uploaded to the workshop. == Creating your language file == You should start...")
 
Line 22: Line 22:
 
== Uploading to the Steam Workshop ==
 
== Uploading to the Steam Workshop ==
 
See [[Uploading to the workshop]] on how to upload your language file to the Steam Workshop.
 
See [[Uploading to the workshop]] on how to upload your language file to the Steam Workshop.
 +
 +
 +
<center>{{Template:BaseNav}}</center>

Revision as of 19:56, 26 March 2018

Language files are pretty straight forward to make, and they can be uploaded to the workshop.

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.

Languages.png

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.