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
30
S
6
G
8
Posts: 232
Reputation: 6,119

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
247
S
85
G
40
Posts: 7,000
Reputation: 57,795


Return to How do I....?

Who is online

Users browsing this forum: Lof, YoHoho and 20 guests