How do I add two languages ??in my game.?

Get help using Construct 2

Post » Sat Nov 02, 2013 2:36 pm

Hello
My question is how do I put two languages ??in my game


Thank you
B
49
S
31
G
21
Posts: 9
Reputation: 8,076

Post » Sat Nov 02, 2013 4:25 pm

it depends what you want to change
B
109
S
26
G
46
Posts: 1,886
Reputation: 35,168

Post » Sat Nov 02, 2013 4:41 pm

Well, if you want to change text in images (sprites), then you'd have to create them for each language and put them as animation frames, which are changed upon checking what language the game is running in.

However, if you want to change actual text strings,
then i guess you could set text to a variable + string combination,
such as
> Scoredisplay set text to [Player.Score & Randomtextitem.Scorestring]
as opposed to
> Scoredisplay set text to [Player.Score & " <- Your score"]
and change the string contents based on what language is used.
I'd probably do something lazy and store all of my text strings for a layer in a single object's private variables (probably not a good thing to do).

As for the actual way of storing what language is used, i'd say that a single global variable and usage of webstorage should be entirely sufficient.Stiivais2013-11-02 16:42:12
B
10
S
1
Posts: 163
Reputation: 1,436

Post » Sat Nov 02, 2013 4:48 pm

Here is an example with r148.

https://db.tt/iYcIdVhJmrcgkh2013-11-02 16:49:41
B
21
S
8
G
6
Posts: 177
Reputation: 8,134

Post » Sat Nov 02, 2013 7:53 pm

Thank you for the beautiful explanation
B
49
S
31
G
21
Posts: 9
Reputation: 8,076

Post » Sat Nov 02, 2013 7:54 pm

[QUOTE=mrcgkh] Here is an example with r148.

https://db.tt/iYcIdVhJ[/QUOTE]

Very nice Thank you for your help
B
49
S
31
G
21
Posts: 9
Reputation: 8,076


Return to How do I....?

Who is online

Users browsing this forum: blackhornet, evillair, gamecorpstudio, jorgmaquoi, ultrafop and 24 guests