Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

How to make and use the language feature Sticky

A topic by James "Kanto" Burton created Feb 07, 2020 Views: 493
Viewing posts 1 to 1
(2 edits)

Howllo Everyone!

As of Version 0.2, the language option has been implemented. This means that if you'd like to help translate the game into another language, this is the feature to use. I will give you a brief tutorial on how to use this feature.

Step 1: Generating and locating the Language File

To start translating the game, you will need to have had run the game once. This way the file can be generated by the game that you can translate. For Windows users it will be located in the directory "C:\Users\[name]\AppData\Local\GraintoGain" where [name] = your user folder. You will find a file named "LANG_english.ini" which will be the file you want.

Step 2: Making a new translation

Make a copy of the "LANG_english.ini" file and rename it to something else as long as it keeps the format "LANG_[language].ini" where [language] is the name of the file you would like it to be. Please do not use any spaces and avoid using special characters in the file name. In the file, you will see many sections and variables. Lines labeled with brackets [] should be left alone, as they dictate generally where the text is to be associated with. Such as [titlescreen] means that variables under it before the next brackets [] are the text that would show up in game. The word before the equal sign is the text to be translated, where the word after the equal sign and are in quotation marks "" is what you should replace.

So, for example let's say I want to make a L33TSP34K translation. First, I would copy the "LANG_english.ini" file and rename it as "LANG_L33TSP34K.ini". Then in the file, I would go in and start editing the words to be the what I want so that it would start looking something like this: 

[titlescreen]
continue="C0NT1NU3"
load_game="L04D G4M3"
options="0PT10N5"
credits="CR3D1T5"
quit="R4G3 QU1T!"
...

This will set the words normally on the title screen to the words I wrote them as instead, but only when the language is changed. You may also notice a section labeled [flag] with id="0". You can change this variable to another value to use one of the ingame flags to represent your language change. (At time of writing this tutorial, there are a limited number of flags. I may implement a feature to import a custom flag in the future. The game also cannot support special characters yet, so this may to be implemented sometime in the near future.)

Step 3: Using your transcribed language

Once your done with the file and transcribing, remember to save it! Launch the game and then either in the lower right of the title screen or the lower left of the options menu click and type the name of the language file you'd like to use. It will be whatever is in between the underscore character _ and period character . is, so for me to use the language file that I just made I would type in "L33TSP34K" in the text box. If done correctly, the changes should happen immediately. However, if the it resets the language field to current language being used, then you may not have typed it in correctly.

Step 4: Keeping it updated

This should be simple as I will be using this format for future updates. As the game accumulates more text, it should be easy to keep your language files updated. All you have to do is delete the "LANG_english.ini" file, run the game to generate a new one, and then copy paste the text that you do not have in your current language file. I also try to pay attention on where I can reuse the words, such as "Options" is used on both the title screen and to title the options menu, so it cuts back on how many words need to be translated.

I do hope this helps, and I highly encourage people to help translate the game for everyone to enjoy :3

Thank you for your time, have a nice and safe day!