How do I translate my game/program in multiple languages

Get help using Construct 2

Post » Thu Sep 11, 2014 2:24 pm

Hi i was thinking about .ini file, but i don't know how to do this. Is there any way?
B
23
S
5
G
4
Posts: 142
Reputation: 3,262

Post » Thu Sep 11, 2014 10:36 pm

The best way would be a XML. You can make many other things with it.
The cool thing is:
You create the way it's organized, not limited by groups like in INI
For example, I'm developing an rpg system which has its characters set by an external file.
And I also have a second one just with the text.

Dialog example(which can be furter developed, you can nest an infinity of text inside each character for example)
Code: Select all
<chapter 1>
<character-a>Grab your destiny!</character-a>
<character-b>Did you see the ghost?</character-b>
</chapter 1>

<chapter 2>
<character-a>The cake was a lie.</character-a>
<character-b>There was no ghost? Myths are created by a lack of purpose.</character-b>
</chapter 2>


Example of data for a character, which will get interpreted during the excecution, I can't stop to think about the creative possibilities brought thanks to it and the modularity we could achieve, like, an editor with really easy and straightforward sintax:
Code: Select all
<monster name="Pikatchoo" type="famous" atk="12" def="12">
<info>It's a clone of a famous japanese character, always with the flu</info></monster>


Here is a tutorial link which explains how to get the values from a file:
https://www.scirra.com/tutorials/354/xml-parsing

I suggets also taking a look at w3schools, I found their explanation really easy to grasp and in 3 minutes I was making a heavy-nested file filled with data for characters.
B
6
S
1
G
2
Posts: 26
Reputation: 1,477

Post » Fri Sep 12, 2014 2:19 am

I would just use JSON.
[b]Andrew Donelson[b]
I2TM Labs
https://i2tmlabs.com/
[email protected]
B
15
S
3
Posts: 66
Reputation: 1,136

Post » Fri Sep 12, 2014 2:54 am

@Rexu

Just use Translation plugin: viewtopic.php?f=153&t=87794

If you want to see working example
, go to viewtopic.php?t=115517 and click Block Puzzle
Construct2 Cordova Plugins (currently 87 plugins): https://www.scirra.com/store/construct2 ... ugins-1662

Construct2 Prototype Capx (currently 50 capx): https://www.scirra.com/store/games-with ... -capx-3088

Home page: http://cranberrygame.com
B
65
S
22
G
81
Posts: 780
Reputation: 46,631


Return to How do I....?

Who is online

Users browsing this forum: Lordshiva1948 and 64 guests