language translations

Get help using Construct 2

Post » Wed Jan 25, 2012 2:37 pm

Say I wanted to support multiple languages. How would you recommend doing this with Construct2?
B
5
S
2
G
3
Posts: 1
Reputation: 2,211

Post » Wed Jan 25, 2012 2:48 pm

You could have a 2D array where the Y value is associated with the language and the X value is each respective string. Then at the beginning you could have a menu layout for choose language and a global var called ActiveLanguage. Then whenever you set a text object to a string just pull the appropriate one from the array.
B
31
S
7
G
8
Posts: 232
Reputation: 6,214

Post » Wed Jan 25, 2012 4:08 pm

To check the language, you can use the browser object and compare Browser.Language. (Based on a code where, for example, "en" is english, "fr" french, etc...)
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
269
S
97
G
67
Posts: 7,219
Reputation: 73,864


Return to How do I....?

Who is online

Users browsing this forum: AllanR, rayray, RetroSpock and 10 guests