How to compare a value with variations?

Get help using Construct 2

Post » Tue Mar 19, 2013 12:15 pm

Hi guys, i'm looking a quick solution to compare a value in following instruction:

the browser language is "en" as string.

I want to use "en" string as event compare 2 values for all english browsers.



But the observed result... they return like "en_US", "en_UK", "en_CA", "en_AU", etc.


How to make it work to support all browser languages using special string "en" by one event?
B
96
S
25
G
20
Posts: 3,052
Reputation: 22,638

Post » Tue Mar 19, 2013 12:50 pm

"en" = left(browser.language, 2) should work :)
B
24
S
8
G
7
Posts: 756
Reputation: 7,192

Post » Wed Mar 20, 2013 4:22 am

@vee41 thanks! it worked like charm :)
B
96
S
25
G
20
Posts: 3,052
Reputation: 22,638


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, Braus, supreme676 and 9 guests