[SOLVED] Multilingual Game

Get help using Construct 2

Post » Sat Dec 29, 2012 5:02 pm

Hello,

I want my game to support more than 1 language.

Here is my first try:

http://dl.dropbox.com/u/96203257/MultilingualGame.capx

What do you think about it? Do you know a better way to support more than 1 language?

Best regards,
Astrosus.Astrosus2012-12-31 16:27:31
B
8
S
2
Posts: 110
Reputation: 1,463

Post » Sat Dec 29, 2012 8:24 pm

That would be the worst way possible. What if you have 100 pieces of text that need translating? ;)

Arrays and the Dictionary object would be your best bet. XML would help you but not sure how much you know and it can look quite complex at first. I haven't played too much with the Dictionary object but it sounds like the sort of thing you need. I may be wrong though. On that note, I think I'll toy with it some tonight.
B
15
S
5
G
7
Posts: 877
Reputation: 5,650

Post » Sat Dec 29, 2012 8:38 pm

Sorry, forgot to mention that it's a Jump'n'Run game, so not even 10 pieces of text, but thanks for your advice.
B
8
S
2
Posts: 110
Reputation: 1,463

Post » Sat Dec 29, 2012 10:02 pm

Array is best then.

Here's a capx for you...

https://dl.dropbox.com/u/666574/multilingual%20array.capx

Hope that helps some.
B
15
S
5
G
7
Posts: 877
Reputation: 5,650

Post » Sat Dec 29, 2012 10:31 pm

Thanks for your help.

But how to use the array to change the language of different objects and not just type 5 lines in a textbox.

For example 3 different textboxes.

And how to change the image of a tiled background with the language.
B
8
S
2
Posts: 110
Reputation: 1,463

Post » Mon Dec 31, 2012 1:48 pm

Sorry, forgot about this as it was pushed off the first 2 pages. Only found it again by chance.

https://dl.dropbox.com/u/666574/multilingual%20array.capx

Hardcoding the instance variable "arrayIndex" allows different objects to be repeated and the correct translation text is assigned automatically in the For Each Object loop.

As for TiledBackground.. there's an action for that - TiledBackground -> Load Image From URL to change the image during runtime.
B
15
S
5
G
7
Posts: 877
Reputation: 5,650

Post » Mon Dec 31, 2012 3:34 pm

I want to select the language in the options layout. If changed all texts should be changed and the language should be safed. How to accomplish this?

Astrosus2012-12-31 16:02:08
B
8
S
2
Posts: 110
Reputation: 1,463

Post » Mon Dec 31, 2012 4:07 pm

You could have a seperate event sheet with the code dealing with the translations and include that for every layout. You'll still have to copy / create your objects / families per layout as you normally would.
B
15
S
5
G
7
Posts: 877
Reputation: 5,650

Post » Mon Dec 31, 2012 4:12 pm

Ok seems you edited your post while I was posting ;)

Language is a global, so will remain the same layout to layout.

As I said, just have a seperate event sheet with the array code. Put it in a group in that event sheet. That way you can activate the group and execute the code when you like.
B
15
S
5
G
7
Posts: 877
Reputation: 5,650

Post » Mon Dec 31, 2012 4:20 pm

Thank you for your help.
B
8
S
2
Posts: 110
Reputation: 1,463

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 21 guests