Multiple Languages

Get help using Construct 2

Post » Wed Nov 11, 2015 1:17 pm

Hey there,

My game is gonna have multiple language support. So now i got a question.

At the start you can choose your language, let's say english,german and italian. I have set up 3 global variables for each. Now if you choose, lets say english, the variable "english" becomes 1. Now i want all conversations being in english. I'm really not sure what would be the smartest way, but i thought maybe of saving all conversations in an array and just call them by the language-variable. Can somebody tell me if/how this works, cause i'm still learning about arrays but im definitely not quite sure how to use them for this situation.

Thank you in advance!
B
11
S
3
G
2
Posts: 76
Reputation: 1,891

Post » Sat Feb 13, 2016 6:50 pm

Anyone has a smart solution?
B
11
S
3
G
2
Posts: 76
Reputation: 1,891

Post » Sat Feb 13, 2016 7:01 pm

Hi, one variable for the language is enought the value would be german, english or italien.

And yes i think you would need an array with alle the text for each language and always load the
one you need, at least thats how i would do it.

But there will be some problems for example the same sentence in german is offen longer than in english.
So your textobject needs to be bigger too, or your font size smaller.

Example:

Shoot all enemys
Erschieße alle Feinde

you need a score of at least 500
du benötigst mindestens 500 Punkte

use left mouse to fire
benutze die linke Maustaste um zu feuern
Last edited by dsminor on Sat Feb 13, 2016 7:07 pm, edited 5 times in total.
B
7
S
2
Posts: 56
Reputation: 583

Post » Sat Feb 13, 2016 7:03 pm

B
32
S
7
G
4
Posts: 400
Reputation: 4,595

Post » Sat Feb 13, 2016 7:39 pm

@grigrizljac @dsminor
Great Tutorial, thank both of you . Hope i can understand how to do it.
B
11
S
3
G
2
Posts: 76
Reputation: 1,891

Post » Sat Feb 13, 2016 11:45 pm

Another question relating to this topic.

Can somebody tell me how i can write a condition into an xml file? For example, i have a variable which sets the language of the game. Like 1 for english, 2 for german etc. Now i wanna write all the dialogue into an xml file. Now i need to check the condition "if english-variable is 1" then ......... How would i write a variable check inside the xml document?
B
11
S
3
G
2
Posts: 76
Reputation: 1,891


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests