Windows How can I add another language to my game?

D

Dude 4 Ever

Guest
I want to add 3 languages to my game and I want to change the interface and dialog box when these languages are changed, how can I do this. Please help me.
 

TailBit

Member
I guess the thought behind it is to have a list of text, and you don't tell the objects the text they need to read, but the position in the list that they can find the text

Code:
global.text = ds_list_create()
global.text[| 0] = "Welcome"
global.text[| 1] = "Back"
global.text[| 2] = "Cancel"
so if the cancel button had this in the create event:
Code:
line = 2;
and then drew:
Code:
draw_text(x,y, global.text[| line])
then I want to change the text:
Code:
ds_list_clear(global.text);
global.text[| 0] = "Velkommen"
global.text[| 1] = "Tilbake"
global.text[| 2] = "Angre"
Ofc, you could find a better way to create the list, maybe by making a small program that just takes a text document of text and turns it into a ds_list that you can store .. or you could just read in the text document directly, so that others could create their own translations .. ini files would also be possible to use, but I'm not sure about that .. then you could have sections for each language??
 
Top